CoolFace
Datasetpublic

pinecone/reddit-qa

sourceHugging Faceupdated 4y agoView on Hugging Face
3likes78downloads
train.jsonl2168 linesDownload Raw Back to root
1{"thread_id": "kg67jt", "question": "It says I need to close both of my label elements. Haven't I done that?", "comment": "I think the message is thrown off because you didn't close the input tags. Also, opening and closing tags need to be indented the same amount.", "upvote_ratio": 30.0, "sub": "ProgrammingQuestions"}2{"thread_id": "tkqyyc", "question": "I am new to rustc. Am I able to apply a #[derive()] to a type brought into scope with a use?\n\nI want to:\n\nuse: foo::Bar;\n\n#[derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)]\nstruct A {\n    b: Bar;\n    c: Car;\n}\n\nbut this raises a compiler error:\nthe trait 'Archive' is not implemented for 'Bar'", "comment": "`derive` is only applied on declaration. You can't import a `struct` and change it with a `derive`. You'd have to actually go to the file where that `struct` was first declared and add the derive there.\n\nIf that's not possible, you'd need to find a way to not have `Bar` participate in that `struct` to use that specific derive.\n\nPs.: You can also just do what the `derive` is doing manually as well.", "upvote_ratio": 30.0, "sub": "LearnRust"}3{"thread_id": "tmqc20", "question": "Clippy gives me the  warning \"use of 'expect' followed by a function call\" regarding the following piece of code:\n\n`.expect(format!(\"Couldn't find position of {}\", search_word).as_str());`\n\nand advises me to use \n\n`.unwrap_or_else(|| panic!(\"Couldn't find position of {}\", search_word))`\n\ninstead. Does anyone know why this is the case?\n\nEdit:\nExplanation of all the warnings Clippy gives, which I somehow only found now some time after being helped out in this thread:\nhttps://rust-lang.github.io/rust-clippy/master/index.html", "comment": "`.unwrap_or_else(||)` is lazily evaluated, i.e. in your case the `format!()`/`panic!()` macros will get called only if the unwrapping fails. On the other hand, your `.expect()` will call `format!()` every time, even if the newly allocated string (the result of `format!()`) ends up not being used because the unwrapping succeeded. Clippy wants you to avoid an unnecessary allocation that `format!` may make.", "upvote_ratio": 310.0, "sub": "LearnRust"}4{"thread_id": "tmqc20", "question": "Clippy gives me the  warning \"use of 'expect' followed by a function call\" regarding the following piece of code:\n\n`.expect(format!(\"Couldn't find position of {}\", search_word).as_str());`\n\nand advises me to use \n\n`.unwrap_or_else(|| panic!(\"Couldn't find position of {}\", search_word))`\n\ninstead. Does anyone know why this is the case?\n\nEdit:\nExplanation of all the warnings Clippy gives, which I somehow only found now some time after being helped out in this thread:\nhttps://rust-lang.github.io/rust-clippy/master/index.html", "comment": "Because the argument to `expect` is evaluated in any case (as function arguments are always evaluated before the call) so Clippy warns that you\u2019re potentially doing something expensive in *every* case even though it\u2019s only needed in the *exceptional* case.", "upvote_ratio": 110.0, "sub": "LearnRust"}5{"thread_id": "tnmcvl", "question": " I'm writing some code where I need to cast integers to float, but since the casting operation is something that happens very often in the script, I'd like to declare a constant and change the type of the casting from f32 to f64 in order to change all the casting operations immediately.\n\nIs it possible to do something like this in rust?\n\n    const FLOAT: primitive type = f32; \n    let x = 3 as FLOAT;", "comment": "Are you looking for the [`type` keyword](https://doc.rust-lang.org/std/keyword.type.html)?", "upvote_ratio": 180.0, "sub": "LearnRust"}6{"thread_id": "tnmcvl", "question": " I'm writing some code where I need to cast integers to float, but since the casting operation is something that happens very often in the script, I'd like to declare a constant and change the type of the casting from f32 to f64 in order to change all the casting operations immediately.\n\nIs it possible to do something like this in rust?\n\n    const FLOAT: primitive type = f32; \n    let x = 3 as FLOAT;", "comment": "As already said, `type` is what you are asking for. You can use it for the function and struct signatures to quickly change.\n\nBut as for the casting, eventually consider using `try_from` and `from` in place of `as` to ensure the casts don't cause unnecessary panics or unexpected behavior, especially if you want to swap across the board.\n\nRust's type-inference, combined with using `type`, can make non-panicking code that behaves consistently, and `as`, though convenient, has a bunch of possible changes. See https://rust-lang.github.io/rust-clippy/master/#as_conversions and the mentioned clippy lints for what I'm referring to.", "upvote_ratio": 40.0, "sub": "LearnRust"}7{"thread_id": "tp5tij", "question": "I've read a file to a String, and it ends with a '\\n' which makes me unable to convert it to a float, before moving on with other operations. I know that '/n' will have position 5, which makes hesitate between turning the string_var mutable and using string_var.pop() or going with string_var[0..5]. \n\nAre there any advantages with either of them which I should know?", "comment": "I would use [`.trim_end()`](https://doc.rust-lang.org/std/primitive.str.html#method.trim_end) (or `.trim()` if there might be whitespace at the beginning as well.)", "upvote_ratio": 120.0, "sub": "LearnRust"}8{"thread_id": "tp5tij", "question": "I've read a file to a String, and it ends with a '\\n' which makes me unable to convert it to a float, before moving on with other operations. I know that '/n' will have position 5, which makes hesitate between turning the string_var mutable and using string_var.pop() or going with string_var[0..5]. \n\nAre there any advantages with either of them which I should know?", "comment": "I might be wrong on some details but:  \nSlice will create a new stack variable  \nPop will (try to) get the last element and return it \n\nSo generally slice should have better performance.  \nYou could also use `.truncate` which wouldn't do any bonus allocations or returns.  \nBut unless it is some performance-heavy code all of them should do fine. And if it is, benchmarks are the way to go.", "upvote_ratio": 30.0, "sub": "LearnRust"}9{"thread_id": "tptxcp", "question": "Doing rustlings I ran into      \n\n                 match tuple {\n                    (r @ 0..=255, g @ 0..=255, b @ 0..=255) => Ok(Color{\n                    red: r as u8,\n                    green: g as u8,\n                    blue: b as u8,\n                }),\n                ...\n\nI never ran into syntax like this before and would like to read more about it but all I found was one line in the book.  [The book  appendix](https://doc.rust-lang.org/book/appendix-02-operators.html)", "comment": "It's a part of [identifier patterns](https://doc.rust-lang.org/reference/patterns.html#identifier-patterns). It matches the pattern on the right side of `@` and gives the name on the left side to the whole matched value", "upvote_ratio": 120.0, "sub": "LearnRust"}10{"thread_id": "tqey6a", "question": "I know how to print a set number of decimals, and leading white space/zeros, but I'd like to print only 3 digits of a float I'm handling (which I assume never will be > 1000, but can't guarantee won't have fewer digits than 3). Is there some built in way to do this? I can only come up with very convoluted/naive ways to achieve this myself.\n\nTo clarify, the following floats should be printed in the corresponding way: 123.45 -> 123; 12.345 -> 12.3; 1.2345 -> 1.23\n\nExample of a convoluted/naive solution:\n\nlet float\\_to\\_print: f64 = 12.345;\n\nlet non\\_digit\\_numbers = float\\_to\\_print.round().to\\_string().len();\n\nprintln!{\"{:.\\*}\", 3-non\\_digit\\_numbers, float\\_to\\_print};\n\n​\n\nEdit:\n\nAnother possible solution which almost works, and seems better:\n\nlet float\\_to\\_print: f64 = 12.345;  \nlet float\\_string = float\\_to\\_print.to\\_string();  \nlet float\\_to\\_print\\_trimmed = float\\_string\\[0..4\\].trim\\_end\\_matches('.');  \nprintln!(\"{float\\_to\\_print\\_trimmed}\");\n\n[https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=fb51b9a50c358198a76ae8493e06836d](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=fb51b9a50c358198a76ae8493e06836d)\n\nThe logic of the last solution is that if I want at least one decimal to be printed, there will be in total 4 chars (including the period). If there are no decimals to be printed, the slice will leave the string with a trailing period, which is fixed with trim\\_end\\_matches('.'). The issue which remains is that there's no guarantees that the digit won't have fewer digits than 3, which can be solved with some match-statement, but I'd prefer something that uses less resources.", "comment": "`format!(\u201c{:3}\u201d, my_float)`", "upvote_ratio": 90.0, "sub": "LearnRust"}11{"thread_id": "tqkemv", "question": "Hello everyone,\n\nI'm trying to implement some strong types for my application like `CharIndex(usize)` and `ByteIndex(usize)` which both wrap a simple number. I want these types to have basic math functions like `Add` , `Sub` , etc. which operate on the inner number. However, I don't want to have to implement all of them for every new wrapper type I make. Is there a way (or a crate) that allows reuse of the implementation of a type but with a different name? Or does nothing like that exist yet? I think writing a macro could be a solution, but I haven't written macros before and I'm wondering if there's a better solution.\n\n​\n\nNote that a type alias is not what I want, since I would still be able to pass a `CharIndex` to a function which requires a `ByteIndex` (because they are the same type internally).", "comment": "You can use macros to implement various traits and methods for many types at once. This is the price you pay with a new type pattern, you have to explicitly define all the methods.", "upvote_ratio": 30.0, "sub": "LearnRust"}12{"thread_id": "tqkemv", "question": "Hello everyone,\n\nI'm trying to implement some strong types for my application like `CharIndex(usize)` and `ByteIndex(usize)` which both wrap a simple number. I want these types to have basic math functions like `Add` , `Sub` , etc. which operate on the inner number. However, I don't want to have to implement all of them for every new wrapper type I make. Is there a way (or a crate) that allows reuse of the implementation of a type but with a different name? Or does nothing like that exist yet? I think writing a macro could be a solution, but I haven't written macros before and I'm wondering if there's a better solution.\n\n​\n\nNote that a type alias is not what I want, since I would still be able to pass a `CharIndex` to a function which requires a `ByteIndex` (because they are the same type internally).", "comment": "Search on lib.rs for #newtype tag. I just did and found a few interesting takes on making newtypes more convenient:\n\nhttps://lib.rs/crates/shrinkwraprs\nhttps://lib.rs/crates/phantom_newtype\n\nShrinkwrap supports the macro approach and allows you to derive shrinkwrap and be able to access the inner value from the newtype in various ways.\n\nphantom_newtype provides 3 *structs* that implement commonly required traits and are generic over a tag which is used to make them unique to your type using phantom data. It's readme has examples.\n\nShrinkwraprs is much more battle hardened, popular, recently updated. I went to lib.rs to find it and stumbled upon phantom_newtype having never heard of it.\n\nphantom_newtype is really clever and I like the idea. It reminds me of [ghost_cell](https://lib.rs/crates/ghost-cell) and [slotmap](https://docs.rs/slotmap/latest/slotmap/) in some ways. People are able to do clever things with generics! I think you will find yourself more restricted compared to shrinkwrap, and the generics might make the code size bigger/smaller (I'm unsure) compared to shrink-wrapped newtypes.\n\nThere's also usage which looks the same as phantom_newtype but newer and only one struct. Usage has a less informative readme but you should review it if you are thinking of using a \"phantom-style\" newtype.", "upvote_ratio": 30.0, "sub": "LearnRust"}13{"thread_id": "tquups", "question": "Hi,\n\nYes, another borrow checking challenge... The tools I have gathered so far dont work in this instance so Im in need of some help\n\nImagine a building structure that has floors, floors have apartments, and apartments have rooms. Rooms can have a depth, but also a min\\_depth. The challenge is to make sure all rooms in de building should have  the largest min\\_depth as depth.\n\nI made a small code sample here, but note that there is one thing that is very important: The call to update\\_building MUST be in the for loop, because the consecutive updates depend on the result of update\\_building. This is not reflected in the code example. in other words, the `room.mindepth < room.depth` if statement in reality is a lot more complicated\n\n[https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=8a83ba92a1371f5d9837d589b0fdd9e6](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=8a83ba92a1371f5d9837d589b0fdd9e6)\n\nI tried solving this in the following ways:\n\n\\- using loops that use non-mutable variables.\n\n\\- using `while` loops and indices. Since I still need references to the apartments and rooms this also fails.\n\n\\- using `for index in 0..list.len()` kind of loops\n\n\\- cloning the building to use different versions in the for loop and in the `update_building`. This doesnt work of course since the update depends on previous updates.\n\nAll of these run into borrow checker problems, except for the last one that doesn't give correct results", "comment": "Welcome to Rust!\n\nThis is a classic case of *iterator invalidation.* The problem is that if you modify the building the `for` loop indices may now be invalid, or at least may have unintended values: the number of items at each level might be affected by the building update. This is a problem for most any imperative language, not just for Rust: the difference is mainly that Rust will catch it at compile time.\n\nIn what way does a building update depend on previous updates? Does the structure of the building change? If so, you'll have to think carefully about your algorithm and how to get it to work right in this case.", "upvote_ratio": 60.0, "sub": "LearnRust"}14{"thread_id": "trn92p", "question": "I assembled a Computer Science Curriculum that helps practice the acquired academic knowledge in Rust. If you want to learn systems programming in Rust or just be a better programmer, this is for you! Critiques and Contributions are welcome!", "comment": "Thanks, I'll go over it at some point, just not now \ud83d\ude04", "upvote_ratio": 50.0, "sub": "LearnRust"}15{"thread_id": "trn92p", "question": "I assembled a Computer Science Curriculum that helps practice the acquired academic knowledge in Rust. If you want to learn systems programming in Rust or just be a better programmer, this is for you! Critiques and Contributions are welcome!", "comment": "Awesome", "upvote_ratio": 30.0, "sub": "LearnRust"}16{"thread_id": "tsyuhb", "question": "Hello, everybody.\n\nSo I am trying to create simple file reading system, basically you can create file and write into it or you can load a file and read whats inside of it, and I am stuck at writing stuff into a file.\n\nThis is my code for reading and displaying data from a file\n\n    fn load_file(){\n    \n        print!(\"File to load \");\n        let file_name = get_input();\n        let file = File::open(&file_name);\n    \n        match file{\n            Ok(f) => {\n                let reader = BufReader::new(f);\n    \n                println!(\"##### DISPLAYING DATA FROM FILE {} #####\", &file_name);\n                for (_,line) in reader.lines().enumerate(){\n                    let line = line.unwrap();\n                    println!(\"{}\",line);\n                }\n    \n                println!(\"\\n \");\n                load_menu();\n            },\n            Err(_) => {\n                println!(\"\\n ####### ERROR CAN'T LOAD FILE ####### \\n\");\n                load_menu();\n            }\n        }\n    }\n\nAnd this is my code for creating the file and writing data into it\n\n    fn get_input() -> String{\n        let mut input = String::new();\n        print!(\"> \");\n        io::Write::flush(&mut io::stdout()).expect(\"flush failed\");\n        match io::stdin().read_line(&mut input){\n            Ok(_) => String::from(input.trim()),\n            Err(_) => String::from(\"Error, Wrong Input\")\n        }\n    }\n    \n    fn create_file(){\n    \n        print!(\"Name of the file to create \");\n        let file_name = get_input();\n        let file = File::create(&file_name);\n    \n        match file{\n            Ok(_) => {\n                println!(\"##### CREATING FILE  {} #####\", &file_name);\n    \n                let user_input = get_input();\n                match file.write_all(user_input.as_bytes()){\n                    Ok(_) => {\n                        println!(\"Data has been writen into the file !\")\n                    },\n                    Err(_) => {\n                        println!(\"ERROR: Can't write into file\")\n                    }\n                };\n                load_menu();\n            },\n            Err(e) => {\n                println!(\"{}\",e);\n                println!(\"\\n ####### ERROR CAN'T CREATE FILE ####### \\n\");\n                load_menu();\n            }\n        };\n    }\n\nI had tried using this \n\n    fn write_into_file(){\n        let user_input = get_input();\n        let file = File::open(\"file.txt\").unwrap();\n        file.write_all(user_input.as_bytes()).unwrap();\n    }\n\nHowever this doens't work at all. I had followed the e-book provided by the Rust, but there is nothing about working with files.\n\n​\n\nAnybody know better way of saving user Input into a file ?", "comment": "You didn't get the file handle out of the result of `File::create`\n\nhttps://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=6d8ecb9f22174a53aaebfa378b8812d1", "upvote_ratio": 80.0, "sub": "LearnRust"}17{"thread_id": "tt7z8k", "question": "I am using the `rust-decimal` crate here\n\nIf I use the following code to convert from `Decimal` to `f64`, everything works fine:\n\n```rust\nuse rust_decimal::prelude::ToPrimitive;\n\n// Create some decimal\nlet decimal_val: Decimal = Decimal::new(1, 1);\n// Convert to f64\nlet f64_val = decimal_val.to_f64();\n```\n\nBut if I want to avoid the import, and `rust_decimal` is in `Cargo.toml`. I should be able to write this as:\n\n```rust\n// Create some decimal\nlet decimal_val: Decimal = Decimal::new(1, 1);\n// Convert to f64\nlet f64_val = decimal_val.rust_decimal::prelude::ToPrimitive::to_f64();\n```\n\nThis fails with the error \n\n```rust\nlet f64_val = decimal_val.rust_decimal::prelude::ToPrimitive::to_f64();\n                                      ^^ expected one of `(`, `.`, `;`, `?`, `else`, or an operator\n```\n\nI think I have may have the wrong syntax since this should be possible...", "comment": "I assume the function  rust_decimal::prelude::ToPrimitive::to_f64 do exists and takes a self argument.\n\nYou should use the following:\n\nlet f64_val = rust_decimal::prelude::ToPrimitive::to_f64(decimal_val)", "upvote_ratio": 30.0, "sub": "LearnRust"}18{"thread_id": "tt7zgk", "question": "I was learning rust but I dropped the idea because I can't find any videos/articles which explain rust memory management system easily possible. I've found many videos but they just go over my head.\n\nAny resource would be helpful!", "comment": "To summarize as briefly as possible... (and I think there's something like this in the O'Reilly crab book...)\n\nEvery time the Rust compiler compiles your code, it's also constructing an automated proof that no piece of memory can be leaked, double-freed, become part of a pointer loop, get accessed by two threads at the same time, etc, etc, etc. And if you write your code in such a way that the compiler CAN'T construct such a proof... then the compiler just plain won't compile your program!\n\nNow of course you can use `unsafe{}` blocks to write code that *you're* sure are safe. But if those actually turn out to be UNSAFE and there's a memory leak or pointer loop or double-free in them that you didn't notice... guess who's to blame? Hint: NOT the compiler!\n\nThis is what all that ownership and lifetimes and mutable reference stuff boils down to. All those things are ways to manage memory, that the compiler understands well enough so it construct a memory correctness proof when it compiles your program.\n\nIf you want to know more about any specific one of those, and how it allows the compiler to know that memory management is being done correctly, then ask away. I'll do my best to answer. And if I don't know the answer, there's a good chance someone else here does.", "upvote_ratio": 100.0, "sub": "LearnRust"}19{"thread_id": "tt7zgk", "question": "I was learning rust but I dropped the idea because I can't find any videos/articles which explain rust memory management system easily possible. I've found many videos but they just go over my head.\n\nAny resource would be helpful!", "comment": "Rust memory management is just like fairly simple C memory management, except the compiler ensures you have one mutable reference or one-or-more immutable references to any given memory.  But you still use stack allocations or you malloc() space, and free() gets called when the last reference goes out of scope.\n\nThere are complexities on top of that (just like there's sbrk() in C that almost nobody needs to know about), but those are implementation details you probably don't need to know if you're just writing pure Rust and not (say) jumping into other programming languages or calling the OS or implementing the OS yourself.", "upvote_ratio": 50.0, "sub": "LearnRust"}20{"thread_id": "ttf6bh", "question": "I have a string of file contents: `let file_contents = fs::read_to_string(\"myfile.txt\").unwrap();`\n\n\nAnd I have some threads. The first should read the first k lines in the string (lines in the file), the second the next k, etc. The string itself is never modified (not mut). It may be that (k * number_of_threads) is greater than the number of lines in the file, in which case there should be wrap around (a Cycle iter works well). The wrap around means it is possible that the threads are not necessarily looking at distinct lines. \n\n\nHow could I do this in Rust?\n\nCurrently I have,\n\n    let mut cycle_iter = file_contents.lines().cycle();\n    for i in 0..num_threads {\n            ...\n            let processor = Processor::new(cycle_iter.clone());\n            for _i in 0..per_thread_workload {\n                cycle_iter.next();\n            }\n    \n            let thread = spawn(move || processor .run());\n            threads.push(thread);\n        }\n\nI'm having issues with lifetimes\n\n    69  |     let mut cycle_iter = file_contents.lines().cycle();\n        |                          ^^^^^^^^^^^^^^^^^^^^^\n        |                          |\n        |                          borrowed value does not live long enough\n        |                          argument requires that `file_contents` is borrowed for `'static`\n\nIs the problem that my threads may outlive the function which `file_contents` exists in (it won't because I join the threads before exiting, but I guess the compiler can't tell), meaning their iterators would be referring to garbage? If so, how can I fix this?\n\nI tried putting my string on the heap (I vaguely remember doing this for mutex so that multiple threads can make use of it properly):\n\n    let file_contents = Arc::new(fs::read_to_string(\"data/packages.txt\").unwrap());\n\nbut still same problem.", "comment": "You might want to take a look at a crate called rayon. It handles parallel iterations for you quite nicely.\n\nIf it doesn't fit your needs, maybe the brand new [scoped threads api](https://doc.rust-lang.org/nightly/std/thread/fn.scope.html) will do? I just saw that it haven't landed in stable yet, thought it did in 1.61.", "upvote_ratio": 60.0, "sub": "LearnRust"}21{"thread_id": "tu02ey", "question": "Does anyone have any articles, videos or walkthroughs that I can utilize to learn how to build REST APIs?  \n\n\nI just finished an introductory course and wanted to build out a CLI application that would return the definition of an inputted word. I was planning on using the [Merriam-Webster api](https://dictionaryapi.com/products/api-collegiate-dictionary). I'm sure this exists as a crate, I just wanted to get the experience myself. Thanks in advance.", "comment": "I haven't read the full book but I think zero to production in rust would cover what you're trying to learn. \n\nhttps://www.zero2prod.com/\n\nI don't know of any free tutorials or videos that cover what you are asking better than that book, but there are a few other places you might look for more general rust info:\n\nhttps://thesquareplanet.com/ - his YouTube channels is fantastic. \n\nhttps://fasterthanli.me/ - a great blog with rust info. \n\n\nThese YouTube channels have rust info also, but not quite as much my first 3 suggestions. \n\nhttps://youtube.com/channel/UCRA18QWPzB7FYVyg0WFKC6g - this YouTube channel also covers rust topics. \n\nhttps://youtube.com/channel/UCDmSWx6SK0zCU2NqPJ0VmDQ - this channel has a web app series that may be useful. \n\nGood luck!", "upvote_ratio": 100.0, "sub": "LearnRust"}22{"thread_id": "tu02ey", "question": "Does anyone have any articles, videos or walkthroughs that I can utilize to learn how to build REST APIs?  \n\n\nI just finished an introductory course and wanted to build out a CLI application that would return the definition of an inputted word. I was planning on using the [Merriam-Webster api](https://dictionaryapi.com/products/api-collegiate-dictionary). I'm sure this exists as a crate, I just wanted to get the experience myself. Thanks in advance.", "comment": "Hopefully these are helpful:\n\n[https://tms-dev-blog.com/jwt-security-for-a-rust-rest-api/](https://tms-dev-blog.com/jwt-security-for-a-rust-rest-api/)\n\n[https://tms-dev-blog.com/how-to-implement-a-rust-rest-api-with-warp/](https://tms-dev-blog.com/how-to-implement-a-rust-rest-api-with-warp/)", "upvote_ratio": 30.0, "sub": "LearnRust"}23{"thread_id": "tuu3rc", "question": "The _sync_ version of reading/writing files is as per the [rust docs](https://doc.rust-lang.org/std/fs/struct.OpenOptions.html):\n\n    use std::fs::OpenOptions;\n\n    let file = OpenOptions::new()\n                .read(true)\n                .write(true)\n                .create(true)\n                .open(\"foo.txt\");\n\nHow do you do this same thing [_async_ using tokio](https://docs.rs/tokio/latest/tokio/io/trait.AsyncWriteExt.html)? I only see basic examples like this:\n\n    use tokio::io::{self, AsyncWriteExt};\n    use tokio::fs::File;\n\n    #[tokio::main]\n    async fn main() -> io::Result<()> {\n        let data = b\"some bytes\";\n\n        let mut pos = 0;\n        let mut buffer = File::create(\"foo.txt\").await?;\n\n        while pos < data.len() {\n            let bytes_written = buffer.write(&data[pos..]).await?;\n            pos += bytes_written;\n        }\n\n        Ok(())\n    }\n\nI am new to rust and am looking for how to achieve the equivalent of the [Node.js API](https://nodejs.org/docs/latest-v9.x/api/fs.html#fs_fs_open_path_flags_mode_callback), where you specify the file's mode and flags for read/write/create/append/etc.. Not sure the Rust way of doing this async.", "comment": "Tokio has OpenOptions:\n https://docs.rs/tokio/latest/tokio/fs/struct.OpenOptions.html\n\nHowever, keep in mind that file I/O in Tokio is quite slow. If you need it to be fast and async, consider tokio-uring.", "upvote_ratio": 40.0, "sub": "LearnRust"}24{"thread_id": "tvkip4", "question": "Hi, I'm creating a project which calls an external API and I wanted to create an API client struct which holds all the methods for different calls to the API.\nSo I created the stuct, but it grows and grows and the method names are getting longer because the methods call endpoints about different resources.\n\nExample:\nget_resource_by_id(id) \nget_resource_comments_page(resource_id, page_number)\n... And similar for few more resources (about 8-10)\nI was wondering if there is a better way to compose the api client, because now the struct is really bloated.\n\nMy ideas are:\n1. Create a api client per resource (e.g. UserApiClient have all methods about handling user endpoints).\n2. Similar to idea 1, but have all of these api clients under one struct as public members (or hidden behind getters) so you can call it e.g. `apiClient.user.get_by_id(id)`\n3. Having functions without struct at all, composed into different modules (so you need to call this with use of module name like `users::get_by_id(id)` and `posts::get_by_user_id(user_id)`) \n\nWhich idea should I go for? Or maybe all of this is garbage? What would be the most idiomatic way?", "comment": "Why not use a trait? Or several traits? Exposing a struct much less it's fields like this seems like a mistake imo. \n\nTraits are nicer because you can group several similar methods together, but abstract them from the implementation. \nMaking struct fields public also makes them mutable, which might invalidate the struct. It's generally best to only expose fields through immutable methods, and validate constructors / mutable methods to catch invalid inputs at their source.", "upvote_ratio": 40.0, "sub": "LearnRust"}25{"thread_id": "tvkip4", "question": "Hi, I'm creating a project which calls an external API and I wanted to create an API client struct which holds all the methods for different calls to the API.\nSo I created the stuct, but it grows and grows and the method names are getting longer because the methods call endpoints about different resources.\n\nExample:\nget_resource_by_id(id) \nget_resource_comments_page(resource_id, page_number)\n... And similar for few more resources (about 8-10)\nI was wondering if there is a better way to compose the api client, because now the struct is really bloated.\n\nMy ideas are:\n1. Create a api client per resource (e.g. UserApiClient have all methods about handling user endpoints).\n2. Similar to idea 1, but have all of these api clients under one struct as public members (or hidden behind getters) so you can call it e.g. `apiClient.user.get_by_id(id)`\n3. Having functions without struct at all, composed into different modules (so you need to call this with use of module name like `users::get_by_id(id)` and `posts::get_by_user_id(user_id)`) \n\nWhich idea should I go for? Or maybe all of this is garbage? What would be the most idiomatic way?", "comment": "For my crate I copied the design presented here for the gitlab crate:\n\nhttps://plume.benboeckel.net/~/JustAnotherBlog/designing-rust-bindings-for-rest-ap-is", "upvote_ratio": 30.0, "sub": "LearnRust"}26{"thread_id": "twqhet", "question": "I've recently started experimenting with Rust, following the [The Rust Programming Language](https://doc.rust-lang.org/book/title-page.html) book.\n\nIn [Chapter 2](https://doc.rust-lang.org/book/ch02-00-guessing-game-tutorial.html) a simple tutorial for building a guessing game is introduced. The program generates a random number and the user tries to guess it.\n\nI want to implement a function `get_input` responsible for reading and validating the user's input. Until a valid input is given, the program should keep prompting the user for a number.\n\nI don't understand why, but the whole `input = match buffer.trim().parse::<u32>() {...}` block is marked as an \"unreachable expression\".\n\nFor sure there are better ways to implement this, but I'd be grateful if someone could help me understand what's wrong with this specific piece of code and how to fix it.\n\n```\n    fn get_input() -> u32 {\n        let mut input: u32;\n    \n        loop {\n            println!(\"Enter a number:\");\n            \n            // read input from stdin and store it in buffer\n            let mut buffer = String::new();\n            io::stdin()\n                .read_line(&mut buffer)\n                .expect(\"Failed to read the line.\");\n            \n            // if input is not a number stay in the loop, otherwise break out\n            input = match buffer.trim().parse::<u32>() {\n                Ok(num) => {\n                    num;\n                    break;\n                }\n                Err(_) => {\n                    println!(\"Invalid input.\");\n                    continue;\n                }\n            };\n        }\n        input\n    }\n    \n    \n    fn main() {\n        let input: u32 = get_input();\n        println!(\"{}\", input);\n    }\n```", "comment": "If I understand it correctly, neither the Ok or Err branch return anything, since one breaks outside of the loop and the other continues the loop. Hope that helps", "upvote_ratio": 40.0, "sub": "LearnRust"}27{"thread_id": "tx3wdl", "question": "I don't get any Rust analyzer hints when I am working on rustlings.\n\nMy work  around is I just copy it to the playground where I do get some rls(?) help.\n\nCould my issue be not launching VSCode from the correct folder? I usually just open the next file and not any folder in particular.", "comment": "If I recall correctly you have to open the rustlings folder containing the Cargo.toml file.", "upvote_ratio": 30.0, "sub": "LearnRust"}28{"thread_id": "ty9ej0", "question": "The error I get is as follows:\n\nthread 'main' panicked at 'Git is needed to retrieve the soloud source files!: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }', /home/steve/.cargo/registry/src/github.com-1ecc6299db9ec823/soloud-sys-1.0.2/build/source.rs:17:10\n\nand my Cargo.toml file contains this:\n\n\\[package\\]\n\nname = \"audiotest\"\n\nversion = \"0.1.0\"\n\nedition = \"2021\"\n\n\\# See more keys and their definitions at [https://doc.rust-lang.org/cargo/reference/manifest.html](https://doc.rust-lang.org/cargo/reference/manifest.html)\n\n\\[dependencies\\]\n\nsoloud = \"1.0.2\"\n\n​\n\nDoes anyone know what's going wrong and/or how to fix it?", "comment": ">Git is needed to retrieve the soloud source files!\n\nInstall git", "upvote_ratio": 30.0, "sub": "LearnRust"}29{"thread_id": "tydufm", "question": "Hey !\n\nI'm trying to retrieve the mode of a file in Rust, for that I'm using std::fs::FileType.\n\nfor that I create a function that return a FileType : \n\n    use std::fs\n    \n    // s parameter stands for a file path\n    fn file_mode(s: &String) -> fs::FileType {\n        return fs::metadata(s).unwrap().file_type();\n    }\n\nand this function return is : \n\n    FileType(FileType { mode: 33188 })\n\nI can't, and to know how can access that **mode** property ?\n\n​\n\nThanks", "comment": "By \"mode\" do you mean [\"permissions\"](https://doc.rust-lang.org/stable/std/fs/struct.Permissions.html) ?\n\n    fn permissions(path: &str) -> std::io::Result<std::fs::Permissions> {\n        let metadata = std::fs::metadata(path)?;\n        metadata.permissions()\n    }\n\nMost std::fs structs have extension traits only available on particular platforms, for example the [`PermissionsExt`](https://doc.rust-lang.org/stable/std/os/unix/fs/trait.PermissionsExt.html) trait.\n\n[playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=a502f354a406a53416de9620eeb927dc)\n\nYou can find the platform specifics [extension traits here](https://doc.rust-lang.org/stable/std/os/index.html).", "upvote_ratio": 40.0, "sub": "LearnRust"}30{"thread_id": "tyqevp", "question": "Whenever I try to build with Cargo, I now get this error:\n\nCMake Error at CMakeLists.txt:45 (add\\_compile\\_definitions):\n\nUnknown CMake command \"add\\_compile\\_definitions\"\n\n​\n\nIt's obviously an issue with Cmake, but I have Cmake installed and I've tried updating it, but still nothing, I looked up a solution, but all I couldn't find a solution related to Rust/Cargo\n\nIf anyone knows what's up and can give me a hand, it would be greatly appreciated", "comment": "One of your dependencies is calling CMake, most likely as part of its build script. Your version of CMake does not support all of the commands in the CMakeLists file the dependency is invoking.\n\nYour error should contain a lot more information regarding which crate is causing the error, start looking for that and see if you can locate the CMake script itself.\n\nRust / Cargo should not be relevant other than them invoking the dependency's build script, so looking for help with CMake (or your dependency) in general should be enough.\n\nWith no context other than parts of error text that's really all I can say. Neither Rust nor Cargo uses CMake, so the issue should be caused by one of your dependencies. Start looking at any crates you're pulling in that link to C/C++ libraries.\n\nIf you can't find cause, put a minimal repro on GitHub or similar and I'll take a look at it.", "upvote_ratio": 30.0, "sub": "LearnRust"}31{"thread_id": "u0139a", "question": "I am having a problem running `cargo wasm` on a rust project and I'm afraid that it's related to the fact that I'm using an m1 mac. I did the following commands.  \n`cargo generate --git https://github.com/baedrik/snip721-reference-impl.git --name my-snip721`  \n`cd my-snip721`  \n`cargo wasm`  \n\nThis particular repo is designed to be compiled to wasm with the command `cargo wasm` and I know it works perfectly on Windows. When a ran `cargo wasm` on my m1 mac I got an endless string of similar errors. They mostly all follow this format:  \n```\nerror[E0433]: failed to resolve: use of undeclared crate or module `slice`\n    --> /Users/<myusername>/.cargo/registry/src/github.com-1ecc6299db9ec823/byteorder-1.4.3/src/lib.rs:1594:13\n     |\n1594 |             slice::from_raw_parts(src.as_ptr() as *const u64, src.len())\n     |             ^^^^^ use of undeclared crate or module `slice`\n```  \n\n\nI also got a bunch of errors that followed this format.  \n```\nerror[E0425]: cannot find function `copy_nonoverlapping` in this scope\n    --> /Users/<myusername>/.cargo/registry/src/github.com-1ecc6299db9ec823/byteorder-1.4.3/src/lib.rs:1950:13\n     |\n1950 |             copy_nonoverlapping(\n     |             ^^^^^^^^^^^^^^^^^^^ not found in this scope\n...\n2301 |             unsafe_write_slice_native!(src, dst, u32);\n     |             ----------------------------------------- in this macro invocation\n     |\n     = note: this error originates in the macro `unsafe_write_slice_native` (in Nightly builds, run with -Z macro-backtrace for more info)\n```  \n\nSo what seems to be the problem. FYI, I'm using the terminal in visual studio code to run the commands. My mac is an m1 MacBook Pro (16-inch, 2021) running Monterey and I have rustup and cargo updated.", "comment": "I think you're missing the `wasm32-unknown-unknown` target. You'll get further after running:\n\n    rustup target add wasm32-unknown-unknown\n\nBut you're going to run into an issue with the `secp256k1-sys` crate, as the non-rust code won't compile. See: [https://github.com/rust-bitcoin/rust-secp256k1/issues/283](https://github.com/rust-bitcoin/rust-secp256k1/issues/283)", "upvote_ratio": 30.0, "sub": "LearnRust"}32{"thread_id": "u0dla0", "question": "    use chrono::NaiveTime;\n    \n    \n    let match_time;                                                                                                    \n    if let true = NaiveTime::parse_from_str(&match_time_str, \"%H:%M:%S\").is_ok() {    \n        match_time = Some(NaiveTime::parse_from_str(&match_time_str, \"%H:%M:%S\").unwrap())    \n    } else {          \n        match_time = None    \n    }", "comment": "    let match_time = NaiveTime::parse_from_str(&match_time_str, \"%H:%M:%S\").ok();", "upvote_ratio": 80.0, "sub": "LearnRust"}33{"thread_id": "u0dla0", "question": "    use chrono::NaiveTime;\n    \n    \n    let match_time;                                                                                                    \n    if let true = NaiveTime::parse_from_str(&match_time_str, \"%H:%M:%S\").is_ok() {    \n        match_time = Some(NaiveTime::parse_from_str(&match_time_str, \"%H:%M:%S\").unwrap())    \n    } else {          \n        match_time = None    \n    }", "comment": "If you don't care about any error handling, then you would achieve the same thing with:\n\n```let match_time = NaiveTime::parse_from_str(&match_time_str, \"%H:%M:%S\").ok()```\n\nDocumentation on [ok](https://doc.rust-lang.org/std/result/enum.Result.html#method.ok) from Rust docs", "upvote_ratio": 30.0, "sub": "LearnRust"}34{"thread_id": "u0elgk", "question": "Is it possible to match String or str with enum cases? Perhaps with some casts?Or it just does not make sense?\n\n    enum Command {\n      add,\n      edit,\n    }\n    \n    fn read_command(arguments: &[String]) {\n      let command = &arguments[0];\n      let word = &arguments[1];\n    \n      match String::from(command) {\n        Command::add => println!(\"Add command\"),\n        Command::edit => println!(\"Edit command\"),\n        _ => println!(\"Something else\"), \n      }\n    }\n\nObviously I've got an error \"**expected struct std::string::String, found enum Command**\"", "comment": "There's a million different ways you can handle this. I'll show a couple different ones.\n\nFirst: This one is your current issue which can easily be fixed. I just removed the enum and matched based off of &str. [Code Example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=fd7cdde0deed8a48edf0e98562af6278)\n\nSecond: This one uses the enum with data in it and instead of using your &\\[String\\] we use that enum. [Code Example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=85e642ecf9b53834d025c814dfdc4055)\n\nAgain, there are more ways you can do this. I recommend experimenting and looking at the [Rust Book](https://doc.rust-lang.org/book/ch06-00-enums.html) for more information.\n\nI always recommend using the way that makes the most sense to you. Because if you don't know how it works then how will you fix/edit it when the time comes.\n\nAnd ask questions, I or someone else can answer them.", "upvote_ratio": 140.0, "sub": "LearnRust"}35{"thread_id": "u0kvp7", "question": "Several accounts have been sending unsolicited offers to give medical advice in exchange for money or \"coffee.\" These are a violation of this subreddit's rules and likely Reddit's policies against spam. Moderators here can ban accounts from posting here, and we do, but we have no authority over DMs and chats.\n\nIf you receive such a message, you're welcome to report it to us, but there is little more we can do. **Please flag the message/chat as spam, and please report at** [**https://www.reddit.com/report**](https://www.reddit.com/report) **for admin attention!**\n\nThe only thing that can make the spam stop is Reddit administrators, and apparently the only thing that might make them take action is constant pressure.", "comment": "If anyone gives you medical advice and THEN asks for money or something in return tell em to get stuffed. Anyone withholding genuine medical advice for the same reason then tell them u got a prescription for 2 of these \ud83d\udd95\ud83c\udffesuppositories and that they need to complete the course taken 3 x a day with l a rusty meshed glove. \nI can only speak for myself, i dont get paid anywhere near my american counter parts but i am not here to make money (there are much easier and better ways with our knowledge and legitimate qualifications nevermind the ethical dilemma it unfolds) just to help people who may feel they have nowhere else to turn. If any one is in this situation and is being restricted information about their health then u can DM and i will try my best or highlight this in a post here - naming and shaming - and the rest of us will hopefully band together to help with your problem. No one is on this sub to make money and anyone who acts like they are should get an ethical slap from my four prima facie fingers + thumb. Especially a coffee. That just sounds like a dick manoeuvre", "upvote_ratio": 150.0, "sub": "AskDocs"}36{"thread_id": "u0kvp7", "question": "Several accounts have been sending unsolicited offers to give medical advice in exchange for money or \"coffee.\" These are a violation of this subreddit's rules and likely Reddit's policies against spam. Moderators here can ban accounts from posting here, and we do, but we have no authority over DMs and chats.\n\nIf you receive such a message, you're welcome to report it to us, but there is little more we can do. **Please flag the message/chat as spam, and please report at** [**https://www.reddit.com/report**](https://www.reddit.com/report) **for admin attention!**\n\nThe only thing that can make the spam stop is Reddit administrators, and apparently the only thing that might make them take action is constant pressure.", "comment": "Is it verified medical professionals doing this?", "upvote_ratio": 50.0, "sub": "AskDocs"}37{"thread_id": "u1d7av", "question": "Other than it works already why not get rid of using clib and use a rust native  but functionally  **equivalent**  \"rlib\" at some point. Would there be a fundamental reason it would have to be a breaking change?", "comment": "Because c-lib is already in place on the target system making static binaries small and easy to install.", "upvote_ratio": 120.0, "sub": "LearnRust"}38{"thread_id": "u1d7av", "question": "Other than it works already why not get rid of using clib and use a rust native  but functionally  **equivalent**  \"rlib\" at some point. Would there be a fundamental reason it would have to be a breaking change?", "comment": "Partly, because your system call APIs are defined in terms of C types and calling conventions. As described in [this excellent blog](https://gankra.github.io/blah/c-isnt-a-language/).\n\nYou could maybe figure out how to call fork or read directly with pure rust for a given architecture (not the c wrappers, but the system call interface directly), but doing so would be much more difficult than just calling the c wrappers, which have already been ported to all the architectures.\n\nRust standard library already replaces much of the c standard library outside of the system service APIs.", "upvote_ratio": 100.0, "sub": "LearnRust"}39{"thread_id": "u1hldq", "question": "See https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=4401bd55f8a59cb6f22385f8b8f3338f\n\n    fn main() {\n        let mut stack = Vec::new();\n        stack.push(1);\n        stack.push(1);\n        stack.push(stack.pop().unwrap() + stack.pop().unwrap());\n        println!(\"{}\", stack.pop().unwrap());\n    }\n\nseems the only way is to allocate temp variable like \n\n    let b = stack.pop().unwrap();\n    let a = stack.pop().unwrap();\n    stack.push(a + b);\n\nis there a way I'm missing?", "comment": "You can write\n\n    let total = stack.pop().unwrap() + stack.pop().unwrap();\n    stack.push(total);\n\nBut yeah, short of doing some really weird stuff that wouldn't be better that's about as good as it gets.\n\nIt would be nice if the borrow checker was precise enough to figure this out, but it's currently not: it doesn't understand that the borrows in the argument to `push()` can complete before `push()` is called.", "upvote_ratio": 80.0, "sub": "LearnRust"}40{"thread_id": "u23yrt", "question": "The process for replies to serious questions on r/ask requires commenters to begin a comment reply with `answer:`.  Any replies that don't begin with that syntax are removed.  This is a very blunt solution to the problem of redditors' attempts to be hilarious in comments where the OP has requested only serious discussion.\n\nThis has been a source of frustration for many of you who are posting well-intentioned replies that are being auto removed for not following the required syntax.  \n\nBe advised that we have heard your feedback and are taking it into consideration to determine how we can best improve this process for the entire r/ask community. \n\nWe hope to strike a better balance between removing joke/non-serious replies to threads with the `serious replies only` flair and permitting the actual serious replies.\n\nWe've heard you in modmail and in the comments  and will return soon with an announcement on what direction we'll take.   Whatever form the new process takes, it will likely involve a greater role for user reporting so please remember that user reports are the fastest and best way to inform the moderator team of any issues with posts, comments, or users in the community.\n\nThank you for your feedback on this issue and for your continued participation on r/ask.  \n\n-r/ask mod team", "comment": "I don't see what the big deal is.  When the post is removed, you're notified via a message that links to the removed comment.  You can still view it, so just copy your old comment, then paste it into a new comment with the required \"answer:\" in front of it.  It takes five seconds to do.", "upvote_ratio": 50.0, "sub": "ask"}41{"thread_id": "u23yrt", "question": "The process for replies to serious questions on r/ask requires commenters to begin a comment reply with `answer:`.  Any replies that don't begin with that syntax are removed.  This is a very blunt solution to the problem of redditors' attempts to be hilarious in comments where the OP has requested only serious discussion.\n\nThis has been a source of frustration for many of you who are posting well-intentioned replies that are being auto removed for not following the required syntax.  \n\nBe advised that we have heard your feedback and are taking it into consideration to determine how we can best improve this process for the entire r/ask community. \n\nWe hope to strike a better balance between removing joke/non-serious replies to threads with the `serious replies only` flair and permitting the actual serious replies.\n\nWe've heard you in modmail and in the comments  and will return soon with an announcement on what direction we'll take.   Whatever form the new process takes, it will likely involve a greater role for user reporting so please remember that user reports are the fastest and best way to inform the moderator team of any issues with posts, comments, or users in the community.\n\nThank you for your feedback on this issue and for your continued participation on r/ask.  \n\n-r/ask mod team", "comment": "Answer: about fucking time. Making it inconvenient to answer a question someone is seriously asking is a stupid exploitation of the control the mods have. People are gonna troll, no reason to punish us all.", "upvote_ratio": 30.0, "sub": "ask"}42{"thread_id": "u28t3h", "question": "Say I have a enum like the following:\n\n    enum MyEnum{\n        Foo,\n        Bar,\n        Baz,\n    }\n\nI then have a vector like so:\n\n     let v = vec![MyEnum::Foo, MyEnum::Foo, MyEnum::Bar];\n\nI now want to know how many instances of each variant appear in the vector.   Basic questions:\n\n1. what is the most appropriate data structure to represent the mapping from variants to their counts?\n2. how do I go about computing these counts in an efficient way?  \n\n\nI thought to implement this using a `HashMap::<MyEnum,usize>`, but I really don't know if that's the right way to do it.     \n\nAside from these (admittedly very basic) questions, I also don't understand how I can go about identifying how many counts I even require because it's not clear to me how to identify the number of variants I have in the first place.   I know that there is a \"variants\\_count\" function possibly coming in some future rust release, but it seems not to be available yet.  \n\n\nNote that I am aware that I can also attach data to variants of the enum when I define, and thought that I could perhaps do this that way (somehow).   However, my vector `v` in this example will eventually come via an external C application, and I am not clear how much harder it would be to define compatible types if I overcomplicate my enum definition.", "comment": "Check out [Itertools::counts](https://docs.rs/itertools/latest/itertools/trait.Itertools.html#method.counts) to get a `Hashmap::<MyEnum, usize>`. This map will only contain keys where the count is greater than 0, so \"missing\" enums will not be present. That might mean needing to deal with `None` from a `get(MyEnum::Variant)`\n\nSince the vector comes from outside your code, you are left with counting the items yourself. There are more manual ways of doing so, but they all end up involving iterating over the vector.", "upvote_ratio": 120.0, "sub": "LearnRust"}43{"thread_id": "u28t3h", "question": "Say I have a enum like the following:\n\n    enum MyEnum{\n        Foo,\n        Bar,\n        Baz,\n    }\n\nI then have a vector like so:\n\n     let v = vec![MyEnum::Foo, MyEnum::Foo, MyEnum::Bar];\n\nI now want to know how many instances of each variant appear in the vector.   Basic questions:\n\n1. what is the most appropriate data structure to represent the mapping from variants to their counts?\n2. how do I go about computing these counts in an efficient way?  \n\n\nI thought to implement this using a `HashMap::<MyEnum,usize>`, but I really don't know if that's the right way to do it.     \n\nAside from these (admittedly very basic) questions, I also don't understand how I can go about identifying how many counts I even require because it's not clear to me how to identify the number of variants I have in the first place.   I know that there is a \"variants\\_count\" function possibly coming in some future rust release, but it seems not to be available yet.  \n\n\nNote that I am aware that I can also attach data to variants of the enum when I define, and thought that I could perhaps do this that way (somehow).   However, my vector `v` in this example will eventually come via an external C application, and I am not clear how much harder it would be to define compatible types if I overcomplicate my enum definition.", "comment": "So there are two ways to go about this. One is to use, as TopGunSnake suggested, the itertools crate to do the work. And this is perfectly legitimate.\n\nNow, let's consider some alternative approaches to the problem that are instructive for ways to approach this. We can do the hash map addition manually with something like this:\n\n    let mut counts = HashMap::new();\n\nv.iter().for_each(\n    |val| {\n        counts.entry(val)\n            .and_modify(|count| { *count += 1 })\n            .or_insert(1);\n    }\n);\n\nprintln!(\"{counts:?}\")\n\nYou also will need to add\n\n    #[derive(Eq, PartialEq, Hash, Debug)]\n\nto your declaration of `MyEnum` so that you can do the appropriate hashing and equality operations on `MyEnum`.\u00b9\n\nIf this is performance sensitive code, you may find that the default hash algorithm, which goes to some lengths to be resilient against DoS attacks is slow for your needs.\n\nNow for some dark magic as an alternative approach, if we have no fields in the values for MyEnum, we have access to the discriminant, which is just the numeric index (starting at zero) of the enum item. With this, we can construct a vec of counts as follows:\n\n    let mut counts = Vec::new();\n\nv.iter().for_each(\n    |&val| {\n        let idx = val as usize;\n        if counts.len() <= idx {\n            // Make sure there are enough empty entries at the end of the \n            // vec to let us accesswhere we want to be\n            counts.append(&mut vec!(0;idx - counts.len() + 1))\n        }\n            counts[idx] += 1;\n    }\n);\n    println!(\"{counts:?}\");\n\n Here, we need to derive `Copy` and `Clone` for the code to work so that we can move the value out of a reference for the conversion to `usize`.\n\n​\n\n\u2e3b\n\n1. JVM people will be well aware of the need to implement `.equals()` and `.hashCode()` any time you want to use a custom object as the index to a hash map.", "upvote_ratio": 30.0, "sub": "LearnRust"}44{"thread_id": "u2l8z7", "question": "Hi there!\n\nI'm writing some physics code and I'd like to reserve the ability to use arbitrary precision down the road, so I wanted to use generics. Let's say I have a function like this:\n\n```\n// Speed of light in vacuum.\nconst C: f32 = 299792458.0;\n\n// Compute the Lorentz Factor for a given acceleration at time t.\npub fn lorentz<T: num_traits::float::Float>(a: T, t: T) -> T {\n    let x = (a * t) / (C as T);\n    T::sqrt(x)\n}\n```\n\nPredictably, this won't build, because I can't cast to type T. After Googling around, I'm stumped. There is something called constant generics, but it seems to be closer to C++ template parameters. What would be the idiomatic way of doing something like this?", "comment": "Preface with **I know nothing about this crate**. And I'm as useful as a bag of bricks when it comes to math.\n\nI found that you can cast and use it. First generic is just input type. Second is output.\n\n    num_traits::cast::<_, T>(C).unwrap()\n\nWhich works. Another thing I noticed though. C is being messed up (don't know the word right now it's 4 am.)\n\nWith C as u32 it stayed the same. This is just me using println. Once in main and once in lorentz fn with cast value.\n\n    const f32: 299792458.0\n    println C: 299792450\n    println Cast of C: 299792448.0\n    \n    const u32: 299792458\n    println Val: 299792458\n    println Cast of Val: 299792458.0\n\n**I don't know if someone else wants to chime in with some more info. I would appreciate it.**\n\nAnyways bedtime for me.", "upvote_ratio": 80.0, "sub": "LearnRust"}45{"thread_id": "u2l8z7", "question": "Hi there!\n\nI'm writing some physics code and I'd like to reserve the ability to use arbitrary precision down the road, so I wanted to use generics. Let's say I have a function like this:\n\n```\n// Speed of light in vacuum.\nconst C: f32 = 299792458.0;\n\n// Compute the Lorentz Factor for a given acceleration at time t.\npub fn lorentz<T: num_traits::float::Float>(a: T, t: T) -> T {\n    let x = (a * t) / (C as T);\n    T::sqrt(x)\n}\n```\n\nPredictably, this won't build, because I can't cast to type T. After Googling around, I'm stumped. There is something called constant generics, but it seems to be closer to C++ template parameters. What would be the idiomatic way of doing something like this?", "comment": "You can use num_traits::NumCast `T::from(C).unwrap()`, which is required by Float.", "upvote_ratio": 40.0, "sub": "LearnRust"}46{"thread_id": "u3kfph", "question": "Why is this acept in Rust\n\n     for i in &v {    \n         println!(\"{}\", i);\n     } \n\nbut this isn't?\n\n    for i in &my_numbers{\n        println!(\"{}\",my_numbers[i]); \u00a0 \n    }\n\ncould someone help me", "comment": "In the second case 'i' is your enumerator.\n\nThink of a vector containing [1,4,8].\n\nFirst case you iter through the elements 1 4 and 8.\n\nIn the second case you iter through the 1st, 4th and 8th element of your vector.", "upvote_ratio": 140.0, "sub": "LearnRust"}47{"thread_id": "u3kfph", "question": "Why is this acept in Rust\n\n     for i in &v {    \n         println!(\"{}\", i);\n     } \n\nbut this isn't?\n\n    for i in &my_numbers{\n        println!(\"{}\",my_numbers[i]); \u00a0 \n    }\n\ncould someone help me", "comment": "When you say \n\n    for item in &collection \n\nYou're telling Rust to go through the `elements` in collection and borrow them in `item`. So your first example works because it's just dealing with the values in your vector.\n\nBut in the second case, you're trying to use the value as an index. There are two problems here. One is that `i` is going to be the wrong type. You need a `usize` to index into the `vec`, and you have instead a reference to some number. Changing your index to `my_numbers[*i]` will allow rust to infer that the numbers in your `vec` are `usize` (unless you've explicitly stated otherwise), but this is almost certainly not what you want since it's unlikely that you really want to have the values in a `vec` refer to other locations in that same `vec`.\u00b9\n\nMore likely, if you want to iterate by index, you could do something like:\n\n    for i in 0..my_numbers.len() \n\nwhich will iterate over the valid indices on `my_numbers`. As an added bonus, you no longer need the deref `*` so you would be able to just write `my_numbers[i]` when referring to the elements in `my_numbers`.\n\n\u2e3b\n\n1. Although not impossible, I can see using this as a means of representing a directed graph", "upvote_ratio": 80.0, "sub": "LearnRust"}48{"thread_id": "u3snaa", "question": "Is something wrong with my IDE or the Rust extension? This function returns a Result.", "comment": "The `? ` operator only works when the caller also returns a Result of the same error type or a error type where From/Into is implemented.\n\nYou can actually change the signature of main to `fn main() -> Result<(), YourError> {} ` as long as YourError implements core::fmt::Display.", "upvote_ratio": 460.0, "sub": "LearnRust"}49{"thread_id": "u3snaa", "question": "Is something wrong with my IDE or the Rust extension? This function returns a Result.", "comment": "FYI: it seems you ran `cargo run` in your terminal, and it displayed the error message. This means the compiler couldn't compile your code and it should have nothing to do with your IDE or Rust analyser :)", "upvote_ratio": 100.0, "sub": "LearnRust"}50{"thread_id": "u3snaa", "question": "Is something wrong with my IDE or the Rust extension? This function returns a Result.", "comment": "main() should return a Result or Option", "upvote_ratio": 30.0, "sub": "LearnRust"}51{"thread_id": "u4s77q", "question": "Hi guys,\n\nWhat do you use to manage your build pipelines? \n\nSpecifically here are some things that I need to do per build:\n\n\\- separate cargo.toml settings, for example to change LTO settings\n\n\\- copying result files after the build\n\nRight now im using simple shell scripts to do it. I use Webpack a lot in other projects, and commands like 'npm run dev' allow me to do a bunch of stuff during builds. I'd love something similar for my rust project", "comment": "Maybe [profiles](https://doc.rust-lang.org/cargo/reference/profiles.html) would be a nicer solution? I\u2019m not entirely sure what you\u2019re looking for, but maybe [zero2prod](https://www.zero2prod.com/) would also be of use.", "upvote_ratio": 50.0, "sub": "LearnRust"}52{"thread_id": "u4xjel", "question": "Suppose I have a method which opens the file. Since it may fails, it should returns **Result**, right?\n\n    fn create_file(file_name: &str) -> Result<File, &'static str> {\n      let file = OpenOptions::new()\n        .write(true)\n        .create(true)\n        .open(file_name)\n        .unwrap_or_else(|error| {\n          // or more specific / non-panic error handling\n          panic!(\"Problem creating the file: {:?}\", error);\n        });\n    \n      Ok(file)\n    }\n\nBut then, at place of method execution, I have to make basically the same error handling/checking:\n\n    ...\n    let mut file = create_file(FILE_NAME).expect(\"Unable to create new file\");\n    ...\n\nOr I could jut **unwrap** since I have error handling within **open\\_file** ?\n\n    let mut file = create_file(FILE_NAME).unwrap();\n\nHow to do it in a right way?", "comment": "Okay, let's take a simple example where, depending on some numeric input, we cause different errors to occur and propagate up a contrived call-chain:\n\n    use std::error::Error;\n    use std::fmt;\n    use std::io;\n    \n    // our generic result type that can handle any error\n    type GenResult<T> = Result<T, Box<dyn Error + 'static + Send + Sync>>;\n    \n    // our first error type\n    #[derive(Debug)]\n    struct ErrorOne {\n        message: String,\n    }\n    \n    impl ErrorOne {\n        pub fn new(message: &str) -> Self {\n            ErrorOne {\n                message: message.to_string(),\n            }\n        }\n    }\n    \n    impl fmt::Display for ErrorOne {\n        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n            write!(f, \"{}\", self.message)\n        }\n    }\n    \n    impl Error for ErrorOne {}\n    \n    // our second error type\n    #[derive(Debug)]\n    struct ErrorTwo {\n        message: String,\n    }\n    \n    impl ErrorTwo {\n        pub fn new(message: &str) -> Self {\n            ErrorTwo {\n                message: message.to_string(),\n            }\n        }\n    }\n    \n    impl fmt::Display for ErrorTwo {\n        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n            write!(f, \"{}\", self.message)\n        }\n    }\n    \n    impl Error for ErrorTwo {}\n    \n    // helper to get input\n    fn get_num() -> i32 {\n        let mut input = String::new();\n        io::stdin()\n            .read_line(&mut input)\n            .expect(\"failed to read input\");\n        input.trim().parse::<i32>().unwrap()\n    }\n    \n    // the main man\n    fn main() {\n        let option = get_num();\n    \n        // need to do the check only here\n       // and not in any of the lower-levels\n        match foo(option) {\n            Err(e) => println!(\"{}\", e),\n            Ok(val) => println!(\"{}\", val),\n        }\n    }\n    \n    // foo calls bar (which can fail)\n    fn foo(input: i32) -> GenResult<i32> {\n        Ok(bar(input)?)\n    }\n    \n    // bar calls baz (which can fail) and quux (which can fail)\n    fn bar(input: i32) -> GenResult<i32> {\n        baz(input)?;\n        Ok(quux(input)?)\n    }\n    \n    fn baz(input: i32) -> GenResult<()> {\n        if input == 1 {\n            Err(Box::new(ErrorOne::new(\"baz caused an issue\")))\n        } else {\n            Ok(())\n        }\n    }\n    \n    // quux call foobar (which can fail)\n    fn quux(input: i32) -> GenResult<i32> {\n        Ok(foobar(input)?)\n    }\n    \n    fn foobar(input: i32) -> GenResult<i32> {\n        if input == 2 {\n            Err(Box::new(ErrorTwo::new(\"foobar caused an error\")))\n        } else {\n            Ok(100)\n        }\n    }\n    \nRunning it:\n\n    ~/dev/playground/result-demo:$ cargo run --release\n    0\n    100\n\n    ~/dev/playground/result-demo:$ cargo run --release\n    1\n    baz caused an issue\n\n    ~/dev/playground/result-demo:$ cargo run --release\n    2\n    foobar caused an error\n\n\nSo, in this simple (albeit contrived) example, we can start seeing the benefits of not just the `Result` type, but also the `?` operator. Have a look at the annotated code above and see if it makes sense to you.\n\ntl;dr - In your specific case, \n\n   1. Imagine that the`create_file` API is being called by several levels of clients (as in the example shown above), and you *do not* wish to have to pattern-match at each level, or indeed `unwrap` and then propagate at each level. Then having `create_file` return a `Result` starts making sense.      \n\n   2. Imagine then a case like `bar` in the example above  where you have multiple steps within a specific function that can potentially fail. In this case, it's even more useful using the `?` operator in conjunction with (and indeed you have to) using some sort of `Result` as the return type of the function. The alternative would be a veritable mass of spaghetti code. So, basically something like so:\n\n        fn some_function() -> Result<SomeType, SomeError> {\n             can_fail1()?;\n             can_fail2()?;\n            ...\n            can_failN()?;\n\n            Ok(return_this_calls_value()?)\n        }\n\n     Conclusion - yes, use `Result` unless you're absolutely sure that something is only called at most one level deep, or is infallible. It also helps with code documentation.", "upvote_ratio": 80.0, "sub": "LearnRust"}53{"thread_id": "u4xjel", "question": "Suppose I have a method which opens the file. Since it may fails, it should returns **Result**, right?\n\n    fn create_file(file_name: &str) -> Result<File, &'static str> {\n      let file = OpenOptions::new()\n        .write(true)\n        .create(true)\n        .open(file_name)\n        .unwrap_or_else(|error| {\n          // or more specific / non-panic error handling\n          panic!(\"Problem creating the file: {:?}\", error);\n        });\n    \n      Ok(file)\n    }\n\nBut then, at place of method execution, I have to make basically the same error handling/checking:\n\n    ...\n    let mut file = create_file(FILE_NAME).expect(\"Unable to create new file\");\n    ...\n\nOr I could jut **unwrap** since I have error handling within **open\\_file** ?\n\n    let mut file = create_file(FILE_NAME).unwrap();\n\nHow to do it in a right way?", "comment": "Since your code will panic within the `create_file` function it doesn't make sense to return a `Result`. The `Err` will never actually get returned.\n\nYou need to handle the error where it is best suited, either inside the function or at the function call. I generally prefer to handle it outside the function (at the call).", "upvote_ratio": 70.0, "sub": "LearnRust"}54{"thread_id": "u50cz8", "question": "I am trying to implement some vectorized math operations and struggling a bit with borrow checking when computing on vectors in place.   As an example, say I want to implement a \"times two\" operation on a vector.  I implement a trait for vectors like this:  \n\n\n    pub trait TimesTwo {\n        fn timestwo(&mut self, y: &Self);\n    }\n    \n    impl TimesTwo for [f64]\n    {    \n        fn timestwo(&mut self, y: &[f64]){\n            self.iter_mut().zip(y).for_each(|(x,y)| *x = 2. * y);\n        }\n    }\n\nThis is fine if want to do this:\n\n    let mut x = vec![0.,0.,0.];\n    let y = vec![4.,5.,6.];\n    x.timestwo(&y);\n\nIt doesn't work though if want `x` to perform this operation on itself.   In other words,  the borrow checker won't allow this:\n\n    x.timestwo(&self);\n\nThe only options I can see are either :\n\n* Add a separate function like `fn timestwo_self(&mut self);` and use that whenever I want to take `self` as an argument.\n* **only** implement the function to operate elementwise on `self`, and then copy from `y` into `x`before calling this function.   \n\nNeither of these options seems ideal.   The first way means I will have twice as many functions to maintain.   The second way means I only have one function to write, but I effectively end up with two loops; one for the copy, and one for the operation itself.    I really want to avoid this since it is for a scientific computing application.  \n\n\nIs there some other way?", "comment": "Write your modifier as a separate function that takes an element and returns an updated element. Implement a method on your collection to apply modifier to each of its elements. When using with different collections, you can just use that same modifier via iterators. As a result, you only need to implement each of your modifiers once.\n    \n    trait InPlaceOperations {\n        fn modify_with(&mut self, modifier: impl fn(f64) -> f64);\n\n        fn populate_from(&mut self, from: impl Iterator<Item = f64>);\n    }\n\n    impl InPlaceOperations for Vec<f64> {\n        fn modify_with(&mut self, modifier: impl fn(f64) -> f64) {\n            for item in self {\n                *item = modifier(item)\n            }\n        }\n        fn populate_from(&mut self, from: impl Iterator<Item = f64>) {\n           self.iter_mut.zip(from).for_each(|(x, y)| *x = y)\n       }\n    }\n\n    fn times_two(input: f64) -> f64 {\n       input * 2\n    }\n\n    fn divide_by_two(input: f64) -> f64 {\n      // \u2026\n    }\n\n    x.modify(times_two);\n    x.populate_from(y.iter().map(times_two));", "upvote_ratio": 30.0, "sub": "LearnRust"}55{"thread_id": "u590hi", "question": "Hello guys.Basically I just want update existing data in existing file (lets say there is some vector with strings).\n\nAm I doing it wrong?:Is there any way to read data and write from the same file (instance?) using **OpenOptions**? Suppose I have a code like this:\n\n    let mut file_to_read_in = OpenOptions::new()\n      .write(true)\n      .truncate(true)\n      .open(FILE_NAME)\n      .expect(\"Could not open file\");\n\nIf I have **truncate** flag, my file will be cleared before I'll take it.  I can solve my problem with having different files options instances (instances I suppose...? \ud83e\udd14) with code like this:\n\n    let file_to_read_data_first = File::open(FILE_NAME).expect(\"Could not open file\");\n    let mut file_to_read_in = OpenOptions::new()\n      .write(true)\n      .truncate(true)\n      .open(FILE_NAME)\n      .expect(\"Could not open file\");\n\nwhere I firstly read the data from **file\\_to\\_read\\_data\\_first**, update that data and then write to **file\\_to\\_read\\_in**. But it doesn't look good and right.", "comment": "I took a glance at the documentation of File struct.\nIf u understand it correctly, you can open the file for read and write, read the contents and then \"rewind\" that file to the beginning for writing.\nHere are docs for the rewind function: https://doc.rust-lang.org/std/io/trait.Seek.html#method.rewind\n(File implements Seek)\nTake a look into the example - there, they're using it in the opposite way, first writing to file, rewinding and then reading from the beginning.\n\nYou might also want to use `set_len` function to clear the file before writing (because when you just rewind before writing, and the new data takes less bytes, I assume the leftovers from the old contents will be left there right after your new data, possibly making your file corrupt for next read) \nhttps://doc.rust-lang.org/std/fs/struct.File.html#method.set_len\n\nKeep in mind I'm giving you these advice just after reading the documentation, I haven't used them at all, so test it properly :)", "upvote_ratio": 70.0, "sub": "LearnRust"}56{"thread_id": "u5i2r5", "question": "Reading the rust book I have stumbled upon this. In the book it's said that `join()` blocks the main thread until associated thread finishes it work.\n\nNow, kindly look at this code:\n\n```rust\n1 | use std::thread;\n2 |\n3 | fn main() {\n4 |     let s = String::from(\"hi\");\n5 |\n6 |     let r1 = &s;\n7 |\n8 |    \tlet handle = thread::spawn(move || {\n9 |         println!(\"{}\", r1);\n10|   \t});\n11|\n12|   \thandle.join().unwrap();\n13| }\n```\n\nIn theory, as I am doing `handle.join()`, `s` should be dropped after the spawned thread finishes its work. But the error says:\n\n\n```\nlet mut s: String\nGo to String\n\n`s` does not live long enough\nborrowed value does not live long enough (rustcE0597)\nmain.rs(13, 1): `s` dropped here while still borrowed\nmain.rs(8, 18): argument requires that `s` is borrowed for `'static`\n```\n\n\nSo the error is stating that s is dropped at the end of scope while I am trying to use it in another thread. Am I understanding `join()` wrong?", "comment": "The issue is that the compiler doesn't understand that you join the thread right after, while the borrowed value is still alive. All it knows is that a new thread can only borrow values that can live as long as 'static does. You can try `crossbeam::scoped` API that has a workaround allowing you to reference variables from the main thread", "upvote_ratio": 70.0, "sub": "LearnRust"}57{"thread_id": "u5qewx", "question": "PS: Sorry about the horrible formatting in the code block, I tried my best \ud83d\ude05\n\nHello Guys,\n\nI am currently writing some code where I am handling a struct, something like the following struct(only with many more fields, but the same type):\n\n    struct PyData{\n        val1: usize, \n        val2: usize,\n        val3: usize\n    }\n\nI'd like to convert this struct into a HashMap since I using the PyO3 framework to make this a Python library, but I am currently ending up with this ugly thing(with PyError being a custom error type :\n\n    impl PyData{\n        fn get_data(&mut self) -> Result<HashMap<&'static str, usize>, PyError>{\n            let data : self.get_data(); // Method to fetch the data\n            match data {\n                Ok(data) => {\n                Ok(HashMap::from([\n                    (\"val1\", data.val1)    \n                    (\"val2\", data.val2)    \n                    (\"val3\", data.val3)\n                    ]))\n            }\n                Err(_) => Err(PyError),\n            }\n        }\n    }\n\nIs there a better way to do this, instead of my current method? The struct I am using has 15 fields, and will grow in the future, so I would really like to avoid typing the fields in manually if I can.", "comment": "I think a good solution to this would be macros.\nEg: impl_py_data!(struct PyData{\n\u2026fields\u2026\n})\nHere\u2019s an intro to them: https://doc.rust-lang.org/rust-by-example/macros.html\n\nHopes this helps.:). \n\nSorry for bad formatting", "upvote_ratio": 40.0, "sub": "LearnRust"}58{"thread_id": "u5qewx", "question": "PS: Sorry about the horrible formatting in the code block, I tried my best \ud83d\ude05\n\nHello Guys,\n\nI am currently writing some code where I am handling a struct, something like the following struct(only with many more fields, but the same type):\n\n    struct PyData{\n        val1: usize, \n        val2: usize,\n        val3: usize\n    }\n\nI'd like to convert this struct into a HashMap since I using the PyO3 framework to make this a Python library, but I am currently ending up with this ugly thing(with PyError being a custom error type :\n\n    impl PyData{\n        fn get_data(&mut self) -> Result<HashMap<&'static str, usize>, PyError>{\n            let data : self.get_data(); // Method to fetch the data\n            match data {\n                Ok(data) => {\n                Ok(HashMap::from([\n                    (\"val1\", data.val1)    \n                    (\"val2\", data.val2)    \n                    (\"val3\", data.val3)\n                    ]))\n            }\n                Err(_) => Err(PyError),\n            }\n        }\n    }\n\nIs there a better way to do this, instead of my current method? The struct I am using has 15 fields, and will grow in the future, so I would really like to avoid typing the fields in manually if I can.", "comment": "Maybe you can do some magic with traits and serde, since you're kinda serealizing the struct?", "upvote_ratio": 30.0, "sub": "LearnRust"}59{"thread_id": "u68jb0", "question": "I'm writing a program to interact with some [IOT lighting](https://us.yeelight.com/shop/yeelight-led-smart-bulb-w3-multicolor/) over TCP. The lights send status updates over this connection and you can send actions back to them.\n\nI want to be able to know if the connection is dropped, say in the case where they are hard powered off (by turning the light switch off). However, when I try to write to them after powering off the `write` call is successful and returns the correct number of bytes written.  \n\nWhy is this case? And how can I figure out if they're hard powered off? I could send a message over the connection and set a timeout for a response, but wondering if there's something else I'm missing?\n\nHappens on both mac OS and Linux.\n\nCode here: https://github.com/haydenwoodhead/bulb/blob/ff881ccb273ac278bbd8732ef7805e6001b9ddeb/src/server.rs#L192", "comment": "Because a powered off client wont be able to close the stream and inform the other end.  You get the same if you kill the client process instead of closing the connection.  Thus, a *connection* timeout is a good recourse, as the socket waits for an acknowledgment.  \n\nThe mechanism is same for both ways, if the server was abnormally terminated/killed, or the ethernet unplugged, etc.\n\nEdit: Also you are using Tokio, an async library, which means the thread wont block for a timeout before proceeding.  Others used [this library](https://crates.io/crates/tokio-io-timeout)", "upvote_ratio": 60.0, "sub": "LearnRust"}60{"thread_id": "u68jb0", "question": "I'm writing a program to interact with some [IOT lighting](https://us.yeelight.com/shop/yeelight-led-smart-bulb-w3-multicolor/) over TCP. The lights send status updates over this connection and you can send actions back to them.\n\nI want to be able to know if the connection is dropped, say in the case where they are hard powered off (by turning the light switch off). However, when I try to write to them after powering off the `write` call is successful and returns the correct number of bytes written.  \n\nWhy is this case? And how can I figure out if they're hard powered off? I could send a message over the connection and set a timeout for a response, but wondering if there's something else I'm missing?\n\nHappens on both mac OS and Linux.\n\nCode here: https://github.com/haydenwoodhead/bulb/blob/ff881ccb273ac278bbd8732ef7805e6001b9ddeb/src/server.rs#L192", "comment": "That's what TCP keepalive is for. [https://tldp.org/HOWTO/html\\_single/TCP-Keepalive-HOWTO/](https://tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/)   If your operating system does support TCP keepalive, you can send keepalive messages at the application layer (see for example section 4.4 in the BGP specification https://datatracker.ietf.org/doc/html/rfc4271)", "upvote_ratio": 50.0, "sub": "LearnRust"}61{"thread_id": "u6ffx4", "question": "Why not just panic with `index out of bounds` in case of e.g. -1?", "comment": "Indexing uses the [Index](https://doc.rust-lang.org/std/ops/trait.Index.html) trait, which in the case of `Vec` is implemented for `usize`.\n\nIn theory it could be implemented for other types as well, for example an implementation of `Index<isize>` could behave as you described.\n\nI'd actually like to see python-like indexing with negative numbers that index from the end of the vector, but it's probably not useful enough to be implemented.", "upvote_ratio": 90.0, "sub": "LearnRust"}62{"thread_id": "u6ffx4", "question": "Why not just panic with `index out of bounds` in case of e.g. -1?", "comment": "I\u2019m fairly sure it\u2019s because usize matches the size of the addresses that the cpu/mcu uses to find the content of each cell of the vector.   A vec of 100 elements would start at a point in memory that is usize and  then add the size of an element to get the position of the next element.   Everyone please correct me if I said that poorly. You would have to convert what ever you used to get the element to usize eventually. Element  memory address = index * size of + start, all usize is just the most efficient way.", "upvote_ratio": 70.0, "sub": "LearnRust"}63{"thread_id": "u6sqzl", "question": "From what I've read it is not clear to me if there is a full web framework for Rust like rails or Phoenix. It appears to me that Rocket or Actix are closest to this but I'm not sure. Is there anything like a full web framework for Rust yet? I mean something where you get html templating with forms having csrf security and other stuff just work (even if there is more typing than rails), db management, css/js asset management, sessions (with cookies), etc. Having to type more than rails is fine it just needs to actually work without having to think about security holes like csrf. What is the closest thing to this today?", "comment": "I think these 2 posts from this sub can be helpful:\n\n* [Rust on Nails - A full stack architecture for Rust web applications](https://redd.it/u2ny6e)\n* [A Rust server / frontend setup like it's 2022 (with axum and yew)](https://redd.it/tvqlhd)", "upvote_ratio": 110.0, "sub": "LearnRust"}64{"thread_id": "u6zkud", "question": "Hi, quick question,\n\nI have a situation where I need to make sure that the result of an operation is above 0, since it will be assigned to a usize. Is there a way to do this without casting everything to isize first?\n\nlet a:usize = 3;\n\nlet b:usize = 5;\n\nlet res:usize = a - b;\n\n// panic. how to test?", "comment": "If the result is negative this code will only panic in debug mode in release mode it will silently wrap (i think). You can use checked_sub/saturating_sub/wrapping_sub to ensure it's valid. https://doc.rust-lang.org/stable/std/primitive.usize.html#method.checked_sub", "upvote_ratio": 230.0, "sub": "LearnRust"}65{"thread_id": "u6zkud", "question": "Hi, quick question,\n\nI have a situation where I need to make sure that the result of an operation is above 0, since it will be assigned to a usize. Is there a way to do this without casting everything to isize first?\n\nlet a:usize = 3;\n\nlet b:usize = 5;\n\nlet res:usize = a - b;\n\n// panic. how to test?", "comment": "`checked_sub` is one way. `saturating_sub` could also work if you want the result to be zero in the overflow case. If you want the magnitude of the difference, you can use `abs_diff`.\n (https://doc.rust-lang.org/std/primitive.usize.html)\n\nIf you want the magnitude of the difference you could check which is smaller and swap them if necessary, if you'd prefer to do it yourself for whatever reason.", "upvote_ratio": 50.0, "sub": "LearnRust"}66{"thread_id": "u7cmof", "question": "I want to be able to change the desktop volume, is there any crate for this? I had a look through [crates.io](https://crates.io) and couldn't find anything, and also had a look at the linux crates but there are so many. Ideally a cross-OS abstraction, but failing that a Linux specific solution.", "comment": "you can just write your own cross-platform wrapper. there is [waveOutSetVolume](https://docs.microsoft.com/en-us/windows/win32/api/mmeapi/nf-mmeapi-waveoutsetvolume) for windows which windows-rs crate has the bindings for or you can always link Winmm.lib yourself. not sure about linux.", "upvote_ratio": 40.0, "sub": "LearnRust"}67{"thread_id": "u7kyyz", "question": "```rust\n\t  // \n    fn weighted_sum(input: &[f32], weights: &[&[f32]]) {\n         ......\n    }\n\n//above function wont accept\n    &[&[0.1, 0.2, 0.5], &[0.6, 0.3, 0.7]] as an arguments(weights), because \"mismatched types\", but it accepts &[5.2, 0.1, 0.3] as argument(input)\n\neven more mindblowing is the error says it expect &[&[f32]] but it got &[&[f32;3];3]\n\ni could use a vec here but why doesnt this work ?\nthanks in advance\n```", "comment": "Generally Rust will deref arrays / vecs passed by reference if the function accepts a slice, but it won't do this recursively. You can use the .as_ref() method to convert the inner arrays to slices.", "upvote_ratio": 60.0, "sub": "LearnRust"}68{"thread_id": "u7kyyz", "question": "```rust\n\t  // \n    fn weighted_sum(input: &[f32], weights: &[&[f32]]) {\n         ......\n    }\n\n//above function wont accept\n    &[&[0.1, 0.2, 0.5], &[0.6, 0.3, 0.7]] as an arguments(weights), because \"mismatched types\", but it accepts &[5.2, 0.1, 0.3] as argument(input)\n\neven more mindblowing is the error says it expect &[&[f32]] but it got &[&[f32;3];3]\n\ni could use a vec here but why doesnt this work ?\nthanks in advance\n```", "comment": "Are you sure you provided the error correctly? This works on the [rust playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=bfeddafd31abc93d293d94fe9f0803ff). Or am I misreading the post?", "upvote_ratio": 30.0, "sub": "LearnRust"}69{"thread_id": "u88v0d", "question": "I am new to Rust coming from C++ so I was wondering if there was an easy way to open a file and get the integers to store in an array. I don't want to convert to string first, I would like to just read it in directly. The text file format is know and will consist of 9 lines of 9 numbers deperated bt space. I appreciate any help.", "comment": "There is no \"converting to a string first\", as the file contents is already in a string format. Note how the byte-size of a text file containing `4294967295` is 10 bytes despite the fact that 2\\^32-1 easily fits into 4 bytes and even standard machine words are 8 bytes. This is because data in text editors (human readable data) is an array of at least one byte per character, aka a string. \n\nThe reason why you don't have to manually convert it in C++, is because this conversion is done implicitly (which causes it's own problems). \n\nSo instead read the whole file into a string, `split_whitespace` and `collect` into a `Vec<&str>`, then use the method `parse::<u64>()`  on the elements to convert the strs into u64s. \n\nIf you have a guarantee of the size of the integers and properties of the file then you can write a faster implementation, but the implementation above will work in the general case.", "upvote_ratio": 190.0, "sub": "LearnRust"}70{"thread_id": "u9ftdk", "question": "Hi,\n\nI'm about to finish reading the official Rust lang book and I'm interested in creating a CLI app as my next phase of learning Rust.\n\nI want to create something that will be really useful in my learning process, a medium or big project where I can practice most of Rust's features. \n\nSomething the community need or a popular app that has no Rust counterpart will be great!", "comment": "Something like `jq` in rust could be fun.", "upvote_ratio": 70.0, "sub": "LearnRust"}71{"thread_id": "u9ftdk", "question": "Hi,\n\nI'm about to finish reading the official Rust lang book and I'm interested in creating a CLI app as my next phase of learning Rust.\n\nI want to create something that will be really useful in my learning process, a medium or big project where I can practice most of Rust's features. \n\nSomething the community need or a popular app that has no Rust counterpart will be great!", "comment": "I had the same \"problem\" - I've wanted to build some CLI to give Rust a first try on some project, but I had no idea what to do.\nLately I happened to be in a situation that I had to do a lot of manual work on some repositories (github, bitbucket, setting up CI configuration). So I did create CLI to automate some work for me, it was using both Bitbucket and GitHub api, used git2 for managing repositories locally and it was parsing some ci configuration files (yaml) for CI.\n\nLater on i shared it with my team so when there is a need to do some of these actions again, we already have a tool for it :) \n\nThe point is, do something for yourself first, i think this will be a better way of learning than doing something that you're not really interested in using or passionate about (leave that stuff for work \ud83d\ude05).\n\nSo I would suggest thinking of things you can automate for yourself, either personal or work-related things, but something that you care about - this will keep you looking for answers as you'd want to finish this for yourself.\n\nGood luck \ud83e\udd1e", "upvote_ratio": 50.0, "sub": "LearnRust"}72{"thread_id": "ua8tla", "question": "What's the better way to write this\n\n    pub fn first_n_words(text: &str, n: usize) -> String {\n        let words = text.split_whitespace().collect::<Vec<&str>>();\n        words[..words.len().min(n)].join(\" \")\n    }\n\nI don't actually expect the input to ever be large enough to make a difference, but for the sake of learning, let's pretend it could be large.", "comment": "Since split_whitespace() returns a SplitWhitespace, and that type implements Iterator, take a look at the take() function on Iterator.\n\nYou\u2019d put a split_whitespace().take(n).collect()\n\nThere\u2019s a function in the itertools crate, I think, that can also join elements of an Iterator directly without having to collect them first, as well.", "upvote_ratio": 230.0, "sub": "LearnRust"}73{"thread_id": "ua8tla", "question": "What's the better way to write this\n\n    pub fn first_n_words(text: &str, n: usize) -> String {\n        let words = text.split_whitespace().collect::<Vec<&str>>();\n        words[..words.len().min(n)].join(\" \")\n    }\n\nI don't actually expect the input to ever be large enough to make a difference, but for the sake of learning, let's pretend it could be large.", "comment": "As u/ajf said, you want the [`take` method of `Iterator`](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.html#method.take).\n\nFor the function here, searching for the index of the `n`th word delimiter and then doing `&text[..index]` and returning that string slice _could_ be better.", "upvote_ratio": 60.0, "sub": "LearnRust"}74{"thread_id": "uax3l9", "question": "Salutations,\n\nI am working on a program that I think would benefit from being able to run from inside a python program. \n\nI would like to be able to represent my enums and structs and things as Python objects, I'd like to be able to call my Rust functions from inside Python. My googeling led me to [this blogpost](https://bheisler.github.io/post/calling-rust-in-python/), but it was published five years ago and things seem to move quickly in Rust land. So is that information still up-to-date?\n\nIt looks like I somehow have to compile the Rust binary as a shared object, and then in Python-land, create a wrapper around the thing using ctypes or something similar.\n\nDoes anyone here have any experience with this kind of thing?", "comment": "You can check out [PyO3](https://pyo3.rs/), which is the library I see most people using both ways (calling rust from python, or python from rust).", "upvote_ratio": 160.0, "sub": "LearnRust"}75{"thread_id": "uax3l9", "question": "Salutations,\n\nI am working on a program that I think would benefit from being able to run from inside a python program. \n\nI would like to be able to represent my enums and structs and things as Python objects, I'd like to be able to call my Rust functions from inside Python. My googeling led me to [this blogpost](https://bheisler.github.io/post/calling-rust-in-python/), but it was published five years ago and things seem to move quickly in Rust land. So is that information still up-to-date?\n\nIt looks like I somehow have to compile the Rust binary as a shared object, and then in Python-land, create a wrapper around the thing using ctypes or something similar.\n\nDoes anyone here have any experience with this kind of thing?", "comment": "I heartily endorse pyo3.  I recently wrote a project for running encrypted python code for work.  It's basically a command line app that connects to a license server to get a secret key, and uses the key to decrypt an encrypted python script, and then runs it, but also provides a few functions to the python context that the script can use.  So there's a rust program calling into python, which then imports a module that was created by the rust program that started the python script to begin with, and I was able to do all that without too much difficulty, by following the pyo3 documentation, and experimenting a little bit.  It's quite powerful, and once you wrap your mind around the 'py lifetime, and the implicit conversions between python and rust types, pretty straightforward to do what you want.  \n\nThe only thing I couldn't figure out was how to create a python class in rust that subclasses a custom class written in Python, so I opted to make the python class accept a callback in its constructor instead to inject functionality from rust.  It wasn't the most elegant, but it did the trick.", "upvote_ratio": 30.0, "sub": "LearnRust"}76{"thread_id": "uax3l9", "question": "Salutations,\n\nI am working on a program that I think would benefit from being able to run from inside a python program. \n\nI would like to be able to represent my enums and structs and things as Python objects, I'd like to be able to call my Rust functions from inside Python. My googeling led me to [this blogpost](https://bheisler.github.io/post/calling-rust-in-python/), but it was published five years ago and things seem to move quickly in Rust land. So is that information still up-to-date?\n\nIt looks like I somehow have to compile the Rust binary as a shared object, and then in Python-land, create a wrapper around the thing using ctypes or something similar.\n\nDoes anyone here have any experience with this kind of thing?", "comment": "Second the recommendations for pyo3 and maturin, have had great experiences with those. You don't have to use ctypes; it depends on the structure of your project. Most of the time I'll write something that will compile straight to a python library or write a core rust crate and then a python bindings crate that depends on the first and basically creates a clean interface to the rust code the form of python modules, classes, functions, and exceptions.", "upvote_ratio": 30.0, "sub": "LearnRust"}77{"thread_id": "ubwkuy", "question": "Hello! I want to understand how model checkers work, as I am planning to implement one. Also what other topics should I know before diving into model checkers?", "comment": "Are you asking about Formal Methods model checkers?", "upvote_ratio": 30.0, "sub": "AskComputerScience"}78{"thread_id": "ucany7", "question": "I am stuck between either a MacBook pro 13 in and the Air. I could buy the 16GB memory Air for less the amount of the Pro (8GB). I've watched some reviews and they say that there are totally little to no difference between the 2.", "comment": "The MacBook Air should be very similar in performance to the 13\u201c Pro if both have the m1", "upvote_ratio": 50.0, "sub": "AskComputerScience"}79{"thread_id": "ucany7", "question": "I am stuck between either a MacBook pro 13 in and the Air. I could buy the 16GB memory Air for less the amount of the Pro (8GB). I've watched some reviews and they say that there are totally little to no difference between the 2.", "comment": "Literally any one. I use a Thinkpad x201 that's over 10 years old and is perfectly fine for running ides and doing experiments", "upvote_ratio": 40.0, "sub": "AskComputerScience"}80{"thread_id": "ucany7", "question": "I am stuck between either a MacBook pro 13 in and the Air. I could buy the 16GB memory Air for less the amount of the Pro (8GB). I've watched some reviews and they say that there are totally little to no difference between the 2.", "comment": "/r/SuggestALaptop/", "upvote_ratio": 30.0, "sub": "AskComputerScience"}81{"thread_id": "ucc9tv", "question": " \n\nHello all,\n\nAs the title suggest, I am looking for some good books to pickup Rust.  I have read some blogs out there that suggest:\n\nThe Rust Programming Language (Covers Rust 2018) by Steve Klabnik and Carol Nichols\n\nMy  concern is that the book says that it covers Rust 2018.  After some  more searching, I discovered that meant rust 1.31.x.  However, Rust is  now on 1.60.0.  I know that Rust changes pretty frequently so my concern  is the relevancy of the book and what all has changed since.  Hoping  that the community can spread some light on this for me.\n\nThanks in advance.", "comment": "IIRC, the book's been updated for 2021 edition i.e >=1.58", "upvote_ratio": 150.0, "sub": "LearnRust"}82{"thread_id": "ucc9tv", "question": " \n\nHello all,\n\nAs the title suggest, I am looking for some good books to pickup Rust.  I have read some blogs out there that suggest:\n\nThe Rust Programming Language (Covers Rust 2018) by Steve Klabnik and Carol Nichols\n\nMy  concern is that the book says that it covers Rust 2018.  After some  more searching, I discovered that meant rust 1.31.x.  However, Rust is  now on 1.60.0.  I know that Rust changes pretty frequently so my concern  is the relevancy of the book and what all has changed since.  Hoping  that the community can spread some light on this for me.\n\nThanks in advance.", "comment": "I enjoyed reading: [Programming Rust: Fast, Safe Systems Development ](https://www.amazon.com/Programming-Rust-Fast-Systems-Development/dp/1492052590) covers Rust 1.56.0 also has some interesting mini-projects where the authors implement concepts from Rust to show the reader how they work.", "upvote_ratio": 140.0, "sub": "LearnRust"}83{"thread_id": "ucc9tv", "question": " \n\nHello all,\n\nAs the title suggest, I am looking for some good books to pickup Rust.  I have read some blogs out there that suggest:\n\nThe Rust Programming Language (Covers Rust 2018) by Steve Klabnik and Carol Nichols\n\nMy  concern is that the book says that it covers Rust 2018.  After some  more searching, I discovered that meant rust 1.31.x.  However, Rust is  now on 1.60.0.  I know that Rust changes pretty frequently so my concern  is the relevancy of the book and what all has changed since.  Hoping  that the community can spread some light on this for me.\n\nThanks in advance.", "comment": "**Not books, but the best resources I've found for learning rust.**\n\n[Learning Rust! Going through the Rust Language book (Video series)](https://youtube.com/playlist?list=PLSbgTZYkscaoV8me47mKqSM6BBSZ73El6)\n\n[Learning Rust! Exercism.org Rust Track (Video series)](https://youtube.com/playlist?list=PLSbgTZYkscappmMh-4I6Mrro03on9RWgT)\n\n[The Rust Lang Book (Video series)](https://youtube.com/playlist?list=PLai5B987bZ9CoVR-QEIN9foz4QCJ0H2Y8)\n\n[RUST PROGRAMMING TUTORIALS (Video series)](https://youtube.com/playlist?list=PLVvjrrRCBy2JSHf9tGxGKJ-bYAN_uDCUL)\n\n[Learning rust with exercism (Video Series)](https://youtube.com/playlist?list=PLBAZWBMYeVYjK_XjNskASXldA2VJR1G04)\n\n[The Rust Programming Language Book](https://doc.rust-lang.org/book/title-page.html)\n\n[My explanation of the main concepts in Rust](https://gist.github.com/DarinM223/e7237114cfdcf3644f90)\n\n\n[Rust By Example](https://doc.rust-lang.org/book/title-page.html)\n\n[Learning Rust](https://learning-rust.github.io/)\n\n[Educative](https://www.educative.io/courses/learn-rust-from-scratch)\n\n[Tour of Rust](https://tourofrust.com/index.html)\n\n[A half-hour to learn Rust](https://fasterthanli.me/articles/a-half-hour-to-learn-rust)\n\n**Practice**\n\n[Exercism](https://exercism.org/tracks/rust)\n\n[Code Wars](https://www.codewars.com/kata/search/rust)", "upvote_ratio": 90.0, "sub": "LearnRust"}84{"thread_id": "ucfu5e", "question": "Join The Comunity;)\n\nIp:85.190.160.217:17000\n\nDiscord:[https://discord.gg/5bvKEZz5g7](https://discord.gg/5bvKEZz5g7)", "comment": "Is it memory safe?", "upvote_ratio": 70.0, "sub": "LearnRust"}85{"thread_id": "ucqqjy", "question": "...now that MIPS technologies jumped to the RISC-V bandwagon?", "comment": "I don't, but I bet colleges will still be using the current instruction set in 2100.", "upvote_ratio": 50.0, "sub": "AskComputerScience"}86{"thread_id": "ucvk1m", "question": "Hello everyone! I\u2019m an EE working with all EE\u2019s. I\u2019ve inherited a major monstrosity of a program (Python). There are methods that call methods in classes that inherit and use attributes from another classes which have methods that call other modules\u2026etc etc. I tried to track down ONE LINE in a method and I sat there going from module to module for 20 minutes until I gave up. This program has been getting patches and Frankensteined for years, and many of the original engineers either retired or no longer work with the company. I do have two engineers that worked on it briefly and they\u2019re a great resource, but I was wondering if I can some advice from CS people. Is there a methodical way to untangle spaghetti code? My goal for now is to familiarize myself with it and be comfortable going through and maybe very very carefully make some changes/additions/optimizations. Any tips would be greatly appreciated!", "comment": "Read the code\n\nTry to track whatever coherency might exist with \"find usage of\" features of an IDE. Drawing charts may help to get an idea of the callgraph.\n\nBeing completely lost is natural and encouraged -- one of the best ways to learn IMO\n\nAnd then read it again\n\nIf there aren't any tests, start adding them, so that when you refactor, you're certain you don't play whackamole with things breaking.\n\nOnce you've read it enough, try to understand what commonalities may exist, see if you can write down a plan for a refactor, and start slicing up that work into manageable chunks.", "upvote_ratio": 60.0, "sub": "AskComputerScience"}87{"thread_id": "ucvk1m", "question": "Hello everyone! I\u2019m an EE working with all EE\u2019s. I\u2019ve inherited a major monstrosity of a program (Python). There are methods that call methods in classes that inherit and use attributes from another classes which have methods that call other modules\u2026etc etc. I tried to track down ONE LINE in a method and I sat there going from module to module for 20 minutes until I gave up. This program has been getting patches and Frankensteined for years, and many of the original engineers either retired or no longer work with the company. I do have two engineers that worked on it briefly and they\u2019re a great resource, but I was wondering if I can some advice from CS people. Is there a methodical way to untangle spaghetti code? My goal for now is to familiarize myself with it and be comfortable going through and maybe very very carefully make some changes/additions/optimizations. Any tips would be greatly appreciated!", "comment": "First \"methods calling methods calling methods\" is actually encouraged. The alternatives are monoliths of code that are even harder to understand and maintain.\n\nIt's always challenging to work yourself into an unknown code base, learning what is where and how everything is connected. This is always going to need time. What you can look out for is whether the method and variable names are sensible and expressive. \"Can you 'read' the code and understand the gist of it or do you need to  parse everything?\"\n\nA somewhat simple example would be:\n\n    #region get private phone and mobile numbers\n    var eaddrs = new List();\n    foreach (var eaddr in eaddrtbl)\n    {\n        if ((eaddr.Type == \"Mobile\" || eaddr.Type == \"Phone\") && eaddr.IsPrivate)\n        {\n              eaddrs.add(eaddr);\n        }\n    }\n    #endregion\n\nOn it's own it's not terribly hard to understand but it does take up 10 lines and burdens your mind with three constructs (define-assign-separation, loop and branch). If your method does 20 such things with some additional nesting that gets hard to follow. Something like Linq can help shorten it:\n\n    var eaddrs = eaddrtbl.Where(eaddr => \n        (eaddr.Type == \"Mobile\" || eaddr.Type == \"Phone\") && eaddr.IsPrivate\n    ).ToList();\n\nYou replaced 3 constructs and 10 lines with 1 construct and 3 lines. But a bunch of those still add up. How about:\n\n    var electronicAddresses = electronicAddressTable.getPrivatePhoneOrMobiles();\n\nYou can easily have 20 such lines in a method and it's still very easy to understand. There are very few instances where such a replacement is overkill IF, and only if, your naming is expressive of what it does. Sure comments could add this information but they are inert documentation and documentation costs effort to create and maintain.\n\n    // get private phone and mobile numbers\n    var lstAdEl = tAdEl.getPrPh();\n\nLittle purely structural changes like that can help immensely when getting a grip on a less than ideal codebase. Martin Fowler's [website](https://refactoring.com/) and [book](http://martinfowler.com/books/refactoring.html) are something of the canonical work in this regard. Worth reading through although the above is likely going to provide you with so much low hanging fruit to pick that you'll be covered for a good while.\n\nAlso, like others said I would look into automated testing, particularly Unit Testing and start putting it into place before you start more advanced refactorings. Unit Testing allows you to define things you expect to be true from a piece of code and quickly check whether they are still true after your changes (be it from refactoring or \"productive\" modifications)\n\nFinally be aware that there is a difference between ugly code and code you just don't understand yet. But they feel very much alike when you first meet them.\n\nObviously you gonna want to have source control in place where you can check in freely so that you can rewind when you fuck up. It should go without saying these days but just in case...", "upvote_ratio": 40.0, "sub": "AskComputerScience"}88{"thread_id": "ucvk1m", "question": "Hello everyone! I\u2019m an EE working with all EE\u2019s. I\u2019ve inherited a major monstrosity of a program (Python). There are methods that call methods in classes that inherit and use attributes from another classes which have methods that call other modules\u2026etc etc. I tried to track down ONE LINE in a method and I sat there going from module to module for 20 minutes until I gave up. This program has been getting patches and Frankensteined for years, and many of the original engineers either retired or no longer work with the company. I do have two engineers that worked on it briefly and they\u2019re a great resource, but I was wondering if I can some advice from CS people. Is there a methodical way to untangle spaghetti code? My goal for now is to familiarize myself with it and be comfortable going through and maybe very very carefully make some changes/additions/optimizations. Any tips would be greatly appreciated!", "comment": "Try to split the code in \"function calling function\". For each function, describe what the function do (or what you think it does, you can change it latter). Read the code and write what you understand of the function and then go deeper. Using a debugger (pdb) could help a lot. It's not necesary to \"go deeper\" if you can summary what a function does in few words (somethimes are just edge cases for a X process, just write \"edge case for X\").\n\nThe first time is always the hardest because everything is new, but after some time doing it the function will call functions you already described.  You should try to start with not so complex functions.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}89{"thread_id": "ud5btb", "question": "This came up in response to Elon Musks acquisition of Twitter.\n\n\nFull quote:\n\n> In principle, I don\u2019t believe anyone should own or run Twitter. It wants to be a public good at a protocol level, not a company. Solving for the problem of it being a company however, Elon is the singular solution I trust. I trust his mission to extend the light of consciousness.\n\n\nSource: https://twitter.com/jack/status/1518772756069773313\n\n\nAll I can imagine is that he believes that there should be an open protocol (like there are protocols for email, presence, etc.) that allowed different implementation of Twitter-like technology to communicate \"tweets\" and users that is outside the ownership of any single company.", "comment": "Kind\u2019ve a random word choice but he means he wants what makes Twitter a public good to be built into the platform itself. As he points out, there are two distinct components to a huge company like twitter. There is the company/shareholder/internal political side and then there is the technology that exists underneath the platform as a whole.", "upvote_ratio": 150.0, "sub": "AskComputerScience"}90{"thread_id": "ud5btb", "question": "This came up in response to Elon Musks acquisition of Twitter.\n\n\nFull quote:\n\n> In principle, I don\u2019t believe anyone should own or run Twitter. It wants to be a public good at a protocol level, not a company. Solving for the problem of it being a company however, Elon is the singular solution I trust. I trust his mission to extend the light of consciousness.\n\n\nSource: https://twitter.com/jack/status/1518772756069773313\n\n\nAll I can imagine is that he believes that there should be an open protocol (like there are protocols for email, presence, etc.) that allowed different implementation of Twitter-like technology to communicate \"tweets\" and users that is outside the ownership of any single company.", "comment": "I think he means Twitter should be something more like SMTP (the \"Email\" protocol) or HTTP (the \"Web\" protocol) - an open protocol that anyone can implement competing clients and/or servers for, rather than a single app/service provided by a single company.", "upvote_ratio": 70.0, "sub": "AskComputerScience"}91{"thread_id": "ud5btb", "question": "This came up in response to Elon Musks acquisition of Twitter.\n\n\nFull quote:\n\n> In principle, I don\u2019t believe anyone should own or run Twitter. It wants to be a public good at a protocol level, not a company. Solving for the problem of it being a company however, Elon is the singular solution I trust. I trust his mission to extend the light of consciousness.\n\n\nSource: https://twitter.com/jack/status/1518772756069773313\n\n\nAll I can imagine is that he believes that there should be an open protocol (like there are protocols for email, presence, etc.) that allowed different implementation of Twitter-like technology to communicate \"tweets\" and users that is outside the ownership of any single company.", "comment": "Stratechery wrote a piece last week about how Twitter the product can be thought of as distinct from Twitter the broadcast-service/social-graph.\n\nhttps://stratechery.com/2022/back-to-the-future-of-twitter/\n\nWhile I don't think Dorsey is arguing for the same outcome, I think they are working with similar concepts. When Dorsey talks about the protocol level, I think he is using an analogy to describe the broadcast and social graph services. Or, in other words, all the infrastructure that aggregates, routes, and distributes messages, but not the actual end-user applications themselves.", "upvote_ratio": 50.0, "sub": "AskComputerScience"}92{"thread_id": "udhs9e", "question": "What's the best IDE for Rust?", "comment": "I think the most common editor/plugin combinations are (in no particular order):\n\n1. VS Code + Rust Analyzer extension\n2. JetBrains CLion or Intellij + Rust Plugin\n3. neovim + lsp + Rust Analyzer\n4. vim + coc + Rust Analyzer\n\nBasically any editor that supports LSP protocol with Rust Analyzer will work.", "upvote_ratio": 500.0, "sub": "LearnRust"}93{"thread_id": "udhs9e", "question": "What's the best IDE for Rust?", "comment": "Intellij comes with many features but it has a yearly fee (in my opinion worth it). VSCode is free and you can equip it with rust-analyzer (and other plugins of your choice) and you\u2019ll be set\n\nEdit: Intellij has the community (free) version too! My bad I forgot about the fact you could get the rust plugin in that one too", "upvote_ratio": 110.0, "sub": "LearnRust"}94{"thread_id": "udhs9e", "question": "What's the best IDE for Rust?", "comment": "Emacs + lsp + rust analyzer is awesome; IntelliJ + Rust plug-in is great\u2014recently published Zero to Production in Rust makes an argument for why IntelliJ is the best option as of publication. I\u2019m sure more people are using VSCode than any of the other options put together though.", "upvote_ratio": 70.0, "sub": "LearnRust"}95{"thread_id": "udvlex", "question": "Hi, thanks for taking the time.\n\nI'm looking for the the rightful owner of a YouTube video.\nTried reverse video/image research with no success.\n\nany ideas would be very much appreciated", "comment": "This is one of the great mysteries of computer science, and there are entire divisions of researchers at MIT working on exactly this problem. It may take some breakthrough in quantum computing before this type of high level analysis is possible. What an incredibly relevant question to computer science as a field.", "upvote_ratio": 90.0, "sub": "AskComputerScience"}96{"thread_id": "udvlex", "question": "Hi, thanks for taking the time.\n\nI'm looking for the the rightful owner of a YouTube video.\nTried reverse video/image research with no success.\n\nany ideas would be very much appreciated", "comment": "That's a legal question.", "upvote_ratio": 70.0, "sub": "AskComputerScience"}97{"thread_id": "ue6aoe", "question": "So my lecture slides says:\n\n>Time between the moment a very short message leaves a machine A until it arrives at machine B (i.e., between A sending and B receiving)\n\nMy question is, is this measurement for 1 bit? If not, say machine A sends a group of bits. Then, does the measurement start when the first bit leaves A or when the last bit leaves A?", "comment": "I think they're saying \"a very short message\" to imply that the time between the first and last bit leaving A is negligible, in comparison to the latency of the system.", "upvote_ratio": 40.0, "sub": "AskComputerScience"}98{"thread_id": "ue6aoe", "question": "So my lecture slides says:\n\n>Time between the moment a very short message leaves a machine A until it arrives at machine B (i.e., between A sending and B receiving)\n\nMy question is, is this measurement for 1 bit? If not, say machine A sends a group of bits. Then, does the measurement start when the first bit leaves A or when the last bit leaves A?", "comment": "You know, I'm not sure if I've seen a definite answer to that. We can philosophize, though: can a message be considered \"sent\" if not all of it has been sent, or considered \"received\" if not all of it has been received?", "upvote_ratio": 30.0, "sub": "AskComputerScience"}99{"thread_id": "uefjom", "question": "Background: I am an undergrad student and have been using Java for the past 5 years. In march I started applying for internships labelled \"Java\" \"Spring MVC\" \"JDBC\" \"J2EE\" etc. I got an offer from a 6 year old company with 30 employees listed in their IT department on linkedin. Now when I asked them yesterday to give me a heads up on what I'll be working with/on they tell me it would be MERN stack, C#, python and php\n\nThe internship will start in 9 days and I received that email yesterday. Please advise me how to learn all this to a level that I can at least understand what's going on if presented some code. Mind you I have never touched JS and only yesterday I realised you can make functions inside functions in it.\n\nI need serious guidance on how to handle this because I can't leave this opportunity since I don't have any other offers currently and I am still applying to as many as I can find", "comment": "MERN is MongoDB, Express, React, Node. On top of that they've thrown THREE more whole programming languages.\n\nNo way you're going to learn even the basics of all of that in 9 days.\n\nBut you've already learned one programming language, you'll be fine with the others. Yes it will take time. But more time than you have right now to get any significant head way, so - in good Dr. House fashion (no point in testing for a disease when the patient will be dead before you get the results) - ignore those. Maybe if you've got time get a feel for the syntax.\n\nYou could put some time into learning the basics of node and express. But there are no big gotchas here and a huge amount to learn. This is like trying to learn all the java framework in a week. Frameworks and APIs are always stuff that you're going to learn as you use them so don't stress it.\n\nThis leaves Mongo DB and React and these are the things I'd start with. Not only are they the only techs mentioned of their kind, they are also fundamentally different enough from what you've likely used before that they are going to be your biggest stumbling blocks.\n\nBut in the end: they accepted you for this internship knowing your qualifications. You'll be expected to learn this stuff *during* - not before - your internship.", "upvote_ratio": 60.0, "sub": "AskComputerScience"}100{"thread_id": "uehlqi", "question": "currently i have something like this:  \n\n     Enum1 {\n        Val1(Enum2),\n        Val2,\n        more values...\n     }\n\n    Enum2 {\n        Val1(String),\n        Val2,\n         more values...\n    }\n\n    let event = Enum1::Val1(Enum2::Val1(String::from(\"yay\")));\n\n    match event {\n        Enum1::Val1(Enum2::Val1(string_value)) {\n            if string_value == \"yay\" then {\n                println!(\"got yay, yay\");\n            }\n        }\n        more patterns ...\n    }  \n\nIs there better way to match the string_value here?", "comment": "You could look at `if let`", "upvote_ratio": 30.0, "sub": "LearnRust"}101{"thread_id": "ueiw3o", "question": "If I want a local data base just for me in my computer I need  to create a local server. Why aren't there any local data bases programs/frameworks/libraries that I can access just like I access a .txt file.\n\nI'm a math student solving a problem that requires a lot of memory usage and I find myself struggling with databases and I don't have too much coding experience, that is why this is a stupid question.", "comment": "There are a lot of these! I guess the most popular one is sqlite, feel free to check it out. It's super simple to setup and surprisingly well supported", "upvote_ratio": 350.0, "sub": "AskComputerScience"}102{"thread_id": "ueiw3o", "question": "If I want a local data base just for me in my computer I need  to create a local server. Why aren't there any local data bases programs/frameworks/libraries that I can access just like I access a .txt file.\n\nI'm a math student solving a problem that requires a lot of memory usage and I find myself struggling with databases and I don't have too much coding experience, that is why this is a stupid question.", "comment": "I think you are misunderstanding what 'server' means in this. Basically, in a client-server style architecture, you have your client, that requests data, and your server that sends data. It's and over simplification but it should give you the picture.\n\nWhen these things say you need a local server, that just means you need to install the server side software on your system. You can then use a client to interact with it, like if you installed MySQL, you could use mysqlworkbench", "upvote_ratio": 40.0, "sub": "AskComputerScience"}103{"thread_id": "ueiw3o", "question": "If I want a local data base just for me in my computer I need  to create a local server. Why aren't there any local data bases programs/frameworks/libraries that I can access just like I access a .txt file.\n\nI'm a math student solving a problem that requires a lot of memory usage and I find myself struggling with databases and I don't have too much coding experience, that is why this is a stupid question.", "comment": "They don't require a server. A .txt file absolutely can be a database. It's just at some point manipulating a text file directly is not an effective way to work with your data.\n\nIt's kinda like running a business. When it's small you might be able to do everything out of your home but as it grows eventually you rent an office suite. As it continues to grow you might need to buy a building and then multiple buildings. If sounds like you've outgrown working from home and think you need to buy a building when really you should be looking for a simple office suite.\n\nIf a simple .txt file doesn't have all the functionality you need then maybe look into using a spreadsheet. You can do a lot of basic database type stuff very easily/quickly with modern spreadsheet software. If your needs outgrow a spreadsheet then something like Microsoft Access (Open Office/Google Docs has similar tools) might be worth looking into.", "upvote_ratio": 40.0, "sub": "AskComputerScience"}104{"thread_id": "ueo719", "question": "I'm looking for project ideas in AI and Software Engineering that can be done in a week.\n\nThey should be fun to do, solve a real-world problem (even though not necessarily perfectly) and finally should be generally doable in a week full-time by one individual.", "comment": "An app that supports social justice/good cause like healthcare, homelessness, etc.", "upvote_ratio": 40.0, "sub": "AskComputerScience"}105{"thread_id": "uesv85", "question": "What exactly is the reasoning behind learning more than one sorting algorithm, is it to teach concepts about how sorting algorithms work to better understand how to think?\n\nBecause I can imagine that learning one really fast algorithm would be a good way too, is there something im missing?\n\nThanks", "comment": "In fact, you will never use any of those algorithms for sorting, and you will most likely only use the \u201cbuilt in\u201d sorting algorithm of the language you are working with (which is usually some sort of hybrid sorting algorithm, such as Timsort for Java - that is not included normally in college curriculum).\n\nThe point of learning many sorting algorithm is the following:\n\n1. It is a relatively easy and straightforward problem, that has many algorithmic solutions\n\n2. It helps you in evaluating and comparing different algorithms \n\n3. It helps you understand that sometimes more intuitive solutions can be improved upon\n\n4. It is a quite didactic intro into some algorithm design strategies, like divide and conquer in the case of mergesort and quicksort.\n\n5. EXTRA: knowing these sorting algorithms is part of the \u201ccommon knowledge\u201d of a Computer Scientist. Just like Calculus might not be the most useful subject it is just something that you should know to be in the club of engineers/scientists, the same is the case with these algorithms. Are they the most practically useful stuff? Not at all. Are they tradtionally part \u201cComputer Scientist common mythology\u201d? Definitely.", "upvote_ratio": 790.0, "sub": "AskComputerScience"}106{"thread_id": "uesv85", "question": "What exactly is the reasoning behind learning more than one sorting algorithm, is it to teach concepts about how sorting algorithms work to better understand how to think?\n\nBecause I can imagine that learning one really fast algorithm would be a good way too, is there something im missing?\n\nThanks", "comment": "yep. and to have bubble sort as your whipping boy in the future", "upvote_ratio": 130.0, "sub": "AskComputerScience"}107{"thread_id": "uesv85", "question": "What exactly is the reasoning behind learning more than one sorting algorithm, is it to teach concepts about how sorting algorithms work to better understand how to think?\n\nBecause I can imagine that learning one really fast algorithm would be a good way too, is there something im missing?\n\nThanks", "comment": "The first time I encountered the idea of a binary search tree was an epiphany to me.  It taught me that *how data is arranged in memory has a direct impact on how quickly code can execute*.  Up to that point, I only knew array and only thought of it as a general collection.\n\n\nI think teaching several different ways of sorting accomplishes something similar.  It is to generate an epiphany.  I.e. *there are different ways to accomplish the same thing, but there are costs are consequences to all of them*.  Such an epiphany will serve the student as he/she continues to learn algorithms and data structures.\n\n----\n\nA second thing though, is that different sorting algorithms may be adapted to solve not-quite-sorting problems.\n\n\nFor example, I was once asked in a job interview to write a function that counted the inversions (i.e. how far (or close) the array is from being sorted) in an array.\n\nI wrote a naive O(n^(2)) solution.\n\nBut the winning solution was to adapt merge sort.", "upvote_ratio": 100.0, "sub": "AskComputerScience"}108{"thread_id": "uetubj", "question": "So I am 16 from the UK, and have just left school so have alot of time on my hands for a few months until I go to college. I started learning to code around 5 or 6 months ago but haven't really got that far because I keep dabbling around in different languages, I started off with Python but then I realised that I didn't really want to do Python anymore because it wasn't too good for what I wanted to do. I think I can get the basics down on a language pretty quickly so I guess thats good, but anyway I am now learning Java but I'm hearing Java isnt used as much or something, im not sure. Could anyone suggest what language would be good to learn (or should I stick with Java?)", "comment": "What language do they use for the college course, and what kind of programming are you interested in doing? Websites? Apps? Embedded? Systems Programming? Etc", "upvote_ratio": 40.0, "sub": "AskComputerScience"}109{"thread_id": "uf9yy8", "question": "I've been working with React Native for the last month or so. My question is, if I get decently good at it, will I be able to apply for Android/iOS engineering roles?", "comment": "Only if they are using ReactNative as part of their tech stack. You won't have experience with Kotlin/Swift, so many roles will not be available.", "upvote_ratio": 70.0, "sub": "AskComputerScience"}110{"thread_id": "ufdu2w", "question": "Do you remember \"personal ads\" in the newspapers? I enjoyed reading the ads but didn't know anyone that placed one. In researching, I discovered ads from the 1800s, including whole newspapers devoted to them.", "comment": "The Village Voice (an uber artsy liberal weekly newspaper based out of New York) had an (in)famous personal ad section. \n\nIn addition to the standard, Men looking for Women and Women looking for Men, they were one of the first that also carried personal ads for gays looking or love or a hookup. They popularized abbreviations that are common today such as, GAM (Gay Asian Male), BiBF (Bisexual Black Female) and so on.\n\nSimilar to Craigslist years later, the last section of the personals was an \"anything goes\" area. People looking for pretty pretty much any sort of kink involving 2 (or more) consenting adults would place ads there. \n\nAhhh the good old days.", "upvote_ratio": 350.0, "sub": "AskOldPeople"}111{"thread_id": "ufdu2w", "question": "Do you remember \"personal ads\" in the newspapers? I enjoyed reading the ads but didn't know anyone that placed one. In researching, I discovered ads from the 1800s, including whole newspapers devoted to them.", "comment": "I'm old, so this was back in the 1980's. My divorced father in NY actually responded to an ad in Sheila Wood's Find a Friend column in one of those supermarket checkout rags. I'd always figured they were sketchy, but the woman (in Texas) responded, and they began a courtship over telephone. He owned a restaurant in a pretty remote area, and all we had was a pay phone. For the next year they called back and forth, until she moved up for their wedding. Not all telephone systems were automated at that time, and I remember the local operators giving them rolls of quarters as a wedding present. They stayed married until his death about a decade ago.\n\nSeems pretty quaint now, with all the \"swipe right\" apps available these days.\n\n(edited)", "upvote_ratio": 350.0, "sub": "AskOldPeople"}112{"thread_id": "ufdu2w", "question": "Do you remember \"personal ads\" in the newspapers? I enjoyed reading the ads but didn't know anyone that placed one. In researching, I discovered ads from the 1800s, including whole newspapers devoted to them.", "comment": "Placing a personal ad in an alternative newspaper is how I met my current (and last, I hope) SO, been together for the last 28 years.", "upvote_ratio": 270.0, "sub": "AskOldPeople"}113{"thread_id": "uffgho", "question": "I would like to start schooling for a software engineering degree but I'm not sure about the prerequisites I need. I'm 34 years old and have been working as a chef for over 15 years. I am really interested in changing careers and software engineering really appeals to me but I don't have any background in computer tech. I also only have my GED; which I received months before I would've graduated high school if I hadn't dropped out. I guess I would like to know what I should do to get a head start. I would like to start classes by the beginning of next year. Any advice would help", "comment": "GED is equivalent to hs diploma so they're interchangeable.if ur trying to get to cc just sign up and schedule meeting with a counselor and they can make you an Ed plan getting in to a uni after so long would be difficult but there's some here or there that take anyone with a pulse so it's not impossible.\n\nBut if ur just trying to do self taught get to work then start applying.\n\nThis is all assuming you're stateside.\n\nCc= community College for clarification", "upvote_ratio": 30.0, "sub": "AskComputerScience"}114{"thread_id": "uffgho", "question": "I would like to start schooling for a software engineering degree but I'm not sure about the prerequisites I need. I'm 34 years old and have been working as a chef for over 15 years. I am really interested in changing careers and software engineering really appeals to me but I don't have any background in computer tech. I also only have my GED; which I received months before I would've graduated high school if I hadn't dropped out. I guess I would like to know what I should do to get a head start. I would like to start classes by the beginning of next year. Any advice would help", "comment": "In the US definitely I would recommend the community college pathway and finish at state university. You should first try out writing code, preferably for something that you have no vested interest in because a lot of software engineering is doing to be writing software that you don't care about, so make sure you enjoy the process not necessarily the end result.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}115{"thread_id": "ufhpas", "question": "If you try to move, rename, or just generally modify a file in Windows while it's being used in another application, you get an error and the OS won't let you.\n\nWhy is this?  Are there operating systems that *do* allow files to be modified in storage while still being used in memory?  Or is there a fundamental problem with doing so?", "comment": "That's a Windows thing, and can be worked around, but that's the default behavior. On Unix-style OSes, you generally *can* delete a file (or move it) while it is open in a program.\n\nThis is because on a typical Unix-style filesystem, an open file is just a reference to a block of data on disk, and does not have the filename associated with it. So, even if that block of data gets a different name associated, or gets removed from its enclosing directory (deletion), it still exists at the same location, until everything using it is done.\n\nThis is often how you do system upgrades while it is running. You might have lots of things using a dynamic library v1.0, then your upgrade deletes that and replaces it with v2.0. All the running programs still have open handles to v1.0, and thus keep functioning. All the new programs you run will open the v2.0 one, though.\n\nIn this [SO Post](https://stackoverflow.com/questions/43758975/can-i-read-a-file-in-windows-in-c-without-locking-folder-containing-the-file), it mentions a solution on Windows of creating a hardlink. On Unix, all files are hardlinks already, essentially.", "upvote_ratio": 80.0, "sub": "AskComputerScience"}116{"thread_id": "ufhpas", "question": "If you try to move, rename, or just generally modify a file in Windows while it's being used in another application, you get an error and the OS won't let you.\n\nWhy is this?  Are there operating systems that *do* allow files to be modified in storage while still being used in memory?  Or is there a fundamental problem with doing so?", "comment": "In addition to what the other comment has said, one potential problem with the OS arbitrarily allowing users to modify files on disk while they are open in memory is that changes to the file do not necessarily write immediately to disk synchronously. Frequently the system will batch up changes and flush them to disk only once in a while. \n\nIf the underlying file gets changed on disk while some changes were made to the file in memory, then the system might end up in a conflict. The changes in memory and the new changes to the file in disk might contradict each other, and the system now has to guess at how to resolve that.\n\nThe warning helps prevent this from happening unintentionally.", "upvote_ratio": 50.0, "sub": "AskComputerScience"}117{"thread_id": "ufkbfl", "question": "I'm an assistant for my university in a research project where I have to access and manipulate really really large files and change the format (JSON to db). The thing is, it's so time consuming and I can't open these files on my computer because they're too big. I'm assuming that's a limitation caused by my RAM, right? I'm currently using a json streaming library through Python. It's so slow. Every new record has to be checked against the pre-streamed records for what we're trying to accomplish. I'm working primarily from a 600 mb JSON file so I know it's not because my computer is crap.\n\nSo if I were to pay for computing access through Amazon or Google Cloud, would that help my issue? Is this what Google Compute Engine is meant for? I'm a little vague on what exactly in my hardware is the limiting factor and what to look for in a paid cloud service.", "comment": "what software are you using to open the file? are you trying to open a 600mb file in notepad or some other text editor?", "upvote_ratio": 40.0, "sub": "AskComputerScience"}118{"thread_id": "ufl8xy", "question": "At what event or occasion did you realize that you are \u201cold\u201d?", "comment": "When I went to a big concert in 2010 or so of a rock band that topped the charts in the 1970s. I saw the people waiting in line and thought, \"I didn't know old people liked this music.\" A nanosecond later it hit me that they were my age.", "upvote_ratio": 1800.0, "sub": "AskOldPeople"}119{"thread_id": "ufl8xy", "question": "At what event or occasion did you realize that you are \u201cold\u201d?", "comment": "Not wanting to get pets that will outlive me.", "upvote_ratio": 1270.0, "sub": "AskOldPeople"}120{"thread_id": "ufl8xy", "question": "At what event or occasion did you realize that you are \u201cold\u201d?", "comment": "70 here.  And I've never felt my age.  I'd comment that 70 is the new 50.  But in Feb, I severed my right quadracep.  Fell on ice, leg buckled underneath and I heard the tendon snap.  This is a fall that I would have taken easily in years past without injury.  But now it was a major rupture and took surgery and months of recovery and Physical Therapy.  This event has made me feel my age for the first time in my life.  I can no longer prance around like a teenager, and any injury is going to take more time to hear.  I've never felt so old until now.", "upvote_ratio": 1150.0, "sub": "AskOldPeople"}121{"thread_id": "ufmsb8", "question": "To those who struggled with anxiety young, how did you/your relationship with it change over time?", "comment": "I left home at 18, and once I had control over my own life, that cut my anxiety down tremendously. I set up my adult life into something that minimized anxiety/stress (i.e., a career that I enjoy and that pays well, NO children, and waiting until my mid 30s to get married.)", "upvote_ratio": 170.0, "sub": "AskOldPeople"}122{"thread_id": "ufmsb8", "question": "To those who struggled with anxiety young, how did you/your relationship with it change over time?", "comment": "You learn to understand it. You know what it is and finally learn that nothing bad is going to happen if you push thru it", "upvote_ratio": 140.0, "sub": "AskOldPeople"}123{"thread_id": "ufmsb8", "question": "To those who struggled with anxiety young, how did you/your relationship with it change over time?", "comment": "Learning yoga - especially breathing and relaxation practices - has been the most effective way I've ever been able to combat anxiety. Luckily I found a good book at the library when I was a teen - and it made all the difference.", "upvote_ratio": 100.0, "sub": "AskOldPeople"}124{"thread_id": "ufozou", "question": "You live your life. learn. work. raise a family. grandkids...what's next? waiting for your final destination? seems like i'm missing something", "comment": "For me, I coast through each day, doing what I want to do.  Sometimes doing \"nothing\" .", "upvote_ratio": 210.0, "sub": "AskOldPeople"}125{"thread_id": "ufozou", "question": "You live your life. learn. work. raise a family. grandkids...what's next? waiting for your final destination? seems like i'm missing something", "comment": "I skipped the family and grandkids part (not interested). I prefer to travel. The moral of the story being you can do with your life whatever you choose... You don't need to follow the script because everybody else is doing it. Unless you're independently wealthy, you probably do need to work, but you can find work that you enjoy doing. You figure out what your interests and passions are and pursue those when you can. You only get one shot... The goal is to spend the majority of it doing things you enjoy as opposed to those you don't and get out of the experience what you can.", "upvote_ratio": 150.0, "sub": "AskOldPeople"}126{"thread_id": "ufozou", "question": "You live your life. learn. work. raise a family. grandkids...what's next? waiting for your final destination? seems like i'm missing something", "comment": "Lots of meditation. Not just 20 minutes in the morning but 5-minute sessions during the day, like 6 of them.  I'm more interested in being in the vast present than tangled up in a bunch of thoughts about what's next.", "upvote_ratio": 110.0, "sub": "AskOldPeople"}127{"thread_id": "ufpbl6", "question": "So 1 byte = 8 bits\n\n2\\^10 bytes = a killobyte, why couldn\u2019t (wasn\u2019t ?) there be 3 kB ram ?\n\nIt was always 4kb, 8, 64, now 1, 2, 4, 8 gigabytes\n\nI really couldn\u2019t find an answer for a long time because if we have 8 bits that\u2019s 2\\^8 states = 256 possible states, so if we have 3 kilobytes that\u2019s 3072 bytes = (3072 \\* 8) bits and thus 2\\^(3072\\*8) possible states. Im not missing anything, so why there is no ram capacities with odd number of bytes/kilobytes/gigabytes ?", "comment": "There have been.  They're just rare.\n\nMemory is addressed by an address bus, meaning a set of wires that are each connected to ground or a voltage.  Say you have two wires. That means there are exactly four memory locations: each of the wires can be connected to ground or voltage, making four unique combinations.  So if you build a two wire memory chip, it makes sense to put four memory registers in it.  You can't put any more, because you wouldn't be able to select them uniquely.\n\nYou _could_ put in less, if you wanted.  If memory registers were super expensive and you only needed three of them, you could make a two-wire, three-register memory.  But as soon as you started combining them, you'd be wasting pins.  Suppose your project calls for seven memory registers.  You'd need three of the 3-register chip, meaning 4 address lines (two that go into the chip and two to select between the three chips).  Compare this to two 4-register chips, which can do the same job with just three lines.  Your CPU only has a limited number of address lines, so wasting them like this is undesirable.\n\nAs a result, memory chips intended for general use are pretty much always \"full\" - every address they can decode is mapped to a register, without any addresses wasted.  And this in turn means that memory chip capacities are always a power of 2.", "upvote_ratio": 220.0, "sub": "AskComputerScience"}128{"thread_id": "ufpbl6", "question": "So 1 byte = 8 bits\n\n2\\^10 bytes = a killobyte, why couldn\u2019t (wasn\u2019t ?) there be 3 kB ram ?\n\nIt was always 4kb, 8, 64, now 1, 2, 4, 8 gigabytes\n\nI really couldn\u2019t find an answer for a long time because if we have 8 bits that\u2019s 2\\^8 states = 256 possible states, so if we have 3 kilobytes that\u2019s 3072 bytes = (3072 \\* 8) bits and thus 2\\^(3072\\*8) possible states. Im not missing anything, so why there is no ram capacities with odd number of bytes/kilobytes/gigabytes ?", "comment": "Since the CPU address bus represents a binary number, the natural size for any memory block is a power of 2. If you had an 11-bit address bus, you could address 2,048 things. A 12-bit bus addresses 4,096 things. In terms of binary addressing, your example of 3,072 is an odd number, so to speak.", "upvote_ratio": 70.0, "sub": "AskComputerScience"}129{"thread_id": "ufpbl6", "question": "So 1 byte = 8 bits\n\n2\\^10 bytes = a killobyte, why couldn\u2019t (wasn\u2019t ?) there be 3 kB ram ?\n\nIt was always 4kb, 8, 64, now 1, 2, 4, 8 gigabytes\n\nI really couldn\u2019t find an answer for a long time because if we have 8 bits that\u2019s 2\\^8 states = 256 possible states, so if we have 3 kilobytes that\u2019s 3072 bytes = (3072 \\* 8) bits and thus 2\\^(3072\\*8) possible states. Im not missing anything, so why there is no ram capacities with odd number of bytes/kilobytes/gigabytes ?", "comment": "There are Xeon boards with 3 dimm channels per cpu.  If you fill them with 1GB dimms, you can end up with 3, 6, or 9GB per cpu.", "upvote_ratio": 50.0, "sub": "AskComputerScience"}130{"thread_id": "ufs1kg", "question": "Bell-bottoms, silk shirts with art-deco patterns, platform shoes, vests and can't remember what else.", "comment": "Clothes hadn't been invented yet. We didn't wear anything.", "upvote_ratio": 40.0, "sub": "AskOldPeople"}131{"thread_id": "ufs1kg", "question": "Bell-bottoms, silk shirts with art-deco patterns, platform shoes, vests and can't remember what else.", "comment": "In the 70s (childhood), I mostly wore jeans, sneakers, and t-shirts.\n\nI did the same in the 80s and 90s.\n\nWhen the 21st century came about, I continued the trend.\n\nNow, in my 50s, I mostly wear jeans, sneakers, and t-shirts.\n\nThe only real difference is that some of the jeans in the 1970s were bell bottoms or \"cowboy cut.\"", "upvote_ratio": 30.0, "sub": "AskOldPeople"}132{"thread_id": "uftqwz", "question": "I'm 46, and I will never miss being forced to wear wool anything. What things from the past that are now gone will you also not ever miss?", "comment": "Pantyhose whenever you wore a dress or skirt. Pads that required a belt before adhesives. Huge pads while you're at it that weren't compressed like now. Tampons with just cotton on the end and no rounded plastic tips, ouch. No cell phones and being able to call for help when you break down at night.", "upvote_ratio": 2390.0, "sub": "AskOldPeople"}133{"thread_id": "uftqwz", "question": "I'm 46, and I will never miss being forced to wear wool anything. What things from the past that are now gone will you also not ever miss?", "comment": "Wool isn\u2019t gone, but I guess it is for you.\n\nI don\u2019t miss second hand smoke.", "upvote_ratio": 2340.0, "sub": "AskOldPeople"}134{"thread_id": "uftqwz", "question": "I'm 46, and I will never miss being forced to wear wool anything. What things from the past that are now gone will you also not ever miss?", "comment": "I'm 55. People whispering the word cancer. Hiding/ locking away people with disabilities or mental health problems. Marital rape being legal. Sexual harassment being the 'price' women paid to have a job. \n\nAnd cigarette smoke, except vaping is making that an issue again.", "upvote_ratio": 1240.0, "sub": "AskOldPeople"}135{"thread_id": "ufzuda", "question": "I'm a CS student who is currently feeling unmotivated to continue diving deep into the fundamentals of programming.\n\nI already know how to build websites but I still consider the kinds of stack the project might need before considering doing it, just because I find it hard to switch from language to language.\n\nTo anyone here who already finds programming language/tools less scary, how does it feel?", "comment": "It feels ok I guess.", "upvote_ratio": 350.0, "sub": "AskComputerScience"}136{"thread_id": "ufzuda", "question": "I'm a CS student who is currently feeling unmotivated to continue diving deep into the fundamentals of programming.\n\nI already know how to build websites but I still consider the kinds of stack the project might need before considering doing it, just because I find it hard to switch from language to language.\n\nTo anyone here who already finds programming language/tools less scary, how does it feel?", "comment": "My skills aren't so much my ability to remember various programming languages and produce algorithms, but more my ability to visualize all of the interactions and the knowledge that there exist algorithms to perform most of the mathematically challenging things.\n\nAnd, my ability to use google.", "upvote_ratio": 80.0, "sub": "AskComputerScience"}137{"thread_id": "ufzuda", "question": "I'm a CS student who is currently feeling unmotivated to continue diving deep into the fundamentals of programming.\n\nI already know how to build websites but I still consider the kinds of stack the project might need before considering doing it, just because I find it hard to switch from language to language.\n\nTo anyone here who already finds programming language/tools less scary, how does it feel?", "comment": "It doesn't feel like anything.  It's like asking how it feels to be able to read without struggling.  You just ... do it.", "upvote_ratio": 70.0, "sub": "AskComputerScience"}138{"thread_id": "ug11np", "question": "I recently saw a story of a man who got out of prison after over 4 decades and thought to myself how the world is literally like an alien world to him and how homesick he must have been. In what ways for you is the world so different that it must feel like you\u2019re in another universe?", "comment": "I miss the days when the Main Street of small towns were full of shops. I miss the small businesses, usually owned by someone you knew, and the feeling of just visiting friends when running errands. I miss the soda counters in drug stores. I miss the train stations that used to be in every small town and the street cars that could be used to get around. You really didn\u2019t need a car. I miss the community life which seems practically non existent now. No one has time for that because everyone is working all the time, just trying to make meds meet.", "upvote_ratio": 2730.0, "sub": "AskOldPeople"}139{"thread_id": "ug11np", "question": "I recently saw a story of a man who got out of prison after over 4 decades and thought to myself how the world is literally like an alien world to him and how homesick he must have been. In what ways for you is the world so different that it must feel like you\u2019re in another universe?", "comment": "The lack of just being. Sure people veg out in front of the TV/screen etc. I miss the days when my grandfather would be sitting outside and neighbors would drop by and talk for awhile. Some would bring their guitar or banjo and they would play for a couple of hours, just being. No rush, no have to do, work day was done or it was Sunday afternoon. People just enjoyed being together. Talking and laughing or talking and consoling for a loss. People knew how to be together without ever seeing a screen. If the phone rang inside, a kid ran to check it or the person would call back later, no rush to interrupt the moment. I guess all that to say, people are too busy (even when not) to just enjoy the company of another human for a bit. I\u2019m as guilty as the next person.\n\nOh and 6-8% interest earnings in my basic savings account.", "upvote_ratio": 1810.0, "sub": "AskOldPeople"}140{"thread_id": "ug11np", "question": "I recently saw a story of a man who got out of prison after over 4 decades and thought to myself how the world is literally like an alien world to him and how homesick he must have been. In what ways for you is the world so different that it must feel like you\u2019re in another universe?", "comment": "All kinds of wildlife are DECIMATED where I live.\n\nBirds. Bugs. Frogs. Deer.  Rabbits.  Wolves. Bobcats. Butterflies. Turtles.   And that's just what's at the top of mind.\n\nI'm in a very rural place, and the extreme decline in all sorts of wildlife is heartbreaking.", "upvote_ratio": 1200.0, "sub": "AskOldPeople"}141{"thread_id": "ug7bsh", "question": "What decade of your life have you enjoyed most so far?", "comment": "40s. My career and that of my husband were going great, but no so great we had trouble finding time to take vacations. The deaths of close relatives and friends hadn't started en masse. I still got hit on at bars by guys young enough to be my kid. I could run 15 miles each Saturday just for fun, and hike in the desert sun for hours.", "upvote_ratio": 80.0, "sub": "AskOldPeople"}142{"thread_id": "ug7bsh", "question": "What decade of your life have you enjoyed most so far?", "comment": "1970-1991 when I was a flight attendant travelling around the world, seeing the sites others paid thousands to see & being paid for it. We stayed in 5-star hotels & resorts, ate exotic foods & experienced different cultures & \"partied\" on duty free booze and enjoyed life.\n\nNow for the last 4 years, I live a completely live a different lifestyle in my 70's. I live in a small village in SE Asia, get up with the sun and go to bed soon after dusk, the same as my 6 cats do. Last night I helped a guy celebrate his 30th birthday, with some of his family & friends at the family house. We sat around with plenty of food from BBQ intestines, hotdogs & pork pieces, chicken in a sour tamarind broth, and other dishes I didn't recognise, a couple of crates of beer & a large bottle of Spanish brandy. It was relaxing sitting & sipping, with nibbling and good conversation and for me a short 800 metre walk home afterwards, although several people offered to drive me home, including a 9yo, with his parents tricycle. He was the one who brought my motorcycle back after his uncle had borrowed it earlier, and to invite me to the party. I would say now is also a great period of my life.", "upvote_ratio": 50.0, "sub": "AskOldPeople"}143{"thread_id": "ug7bsh", "question": "What decade of your life have you enjoyed most so far?", "comment": "30s\n\nmore money. good job. chill boss. having two little kids. much bigger house.", "upvote_ratio": 40.0, "sub": "AskOldPeople"}144{"thread_id": "ug9y9w", "question": "Hi, I have a situation where I need to do up to 5 http requests in parallel. I have some async functions that do the requests. The 5 requests are different data sources but all return Result<FeatureCollection> which is a geodata format. \n\nHowever I don\u2019t know in advance how many I will need to run, that depends on input. \n\nHow do I make sure that the requests run concurrently, and only those that I need?\n\nI\u2019ve looked into the join and join_all macros but they seem to either assume that you know which future/request will run, or that the output will be the same\n\nI\u2019ve also tried setting up a dummy async function that has the same result type as the actual function. However the compiler does not accept this, it complains that the functions have different opaque types even though they dont. This might have to do with the result trait\n\nWhat\u2019s a good way to solve this?", "comment": "You can, for each future that needs to run call Box::pin on it and push it into a Vec::<Pin<Box<dyn Future<Output = YourResult>>>>. You can the use join_all on that.\n\nEdit: Your Problem is that the futures associated with different async functions are different types (e.g. a future with more state that needs to be preserved will neccessarilly be larger). By using Box::<dyn Future>::pin() you move each future to the heap making it possible to store pointers to them in a vector and use *dyn* amic dispatch to distigush between the different future types.", "upvote_ratio": 40.0, "sub": "LearnRust"}145{"thread_id": "ugajyy", "question": "For educational purpouses I want to build an API that returns a random code fragment. To gather the data I'd like to scrape open-source projects on github, but I'm unsure which licenses forbit such actions. For example GNU GPL3.0 requires that I copy the license when I copy the source code.  So here's the question: Projects with which licenses can I scrape for code?", "comment": "This is really a legal question, not a computer science question.\n\nYou can redistribute code that's under any open-source license, but almost any license (not just GPL) will require that you include the original copyright notice and/or license. If you wanted to comply with this requirement, you could just make your API return that information as well. (You probably don't need to include the complete license text with every response; I would think naming the copyright owner and linking to the original repo is good enough. After all, even GitHub doesn't include the complete license text on every web page that it serves up.)\n\nThe major exception to this is if the code is in the public domain, or under a [public-domain-equivalent license](https://en.wikipedia.org/wiki/Public-domain-equivalent_license), such as CC0 or the Unlicense. In that case, it's as if the code was never copyrighted at all, and you can do anything you want with it. (At least, that's how it works in the USA. Some countries also recognize [moral rights](https://en.wikipedia.org/wiki/Moral_rights) which are separate from copyright, and may not be so easily waivable. See why this is such a complicated topic?)\n\nThe other exception would be if your API is considered to fall under [fair use](https://en.wikipedia.org/wiki/Fair_use), but that is an extremely tricky legal question that is definitely out of scope for this subreddit.", "upvote_ratio": 80.0, "sub": "AskComputerScience"}146{"thread_id": "ugav8y", "question": "I drove a maroon Chevy Vega with tan interior with poor transmission.   The guys used to drive fast cars and souped up cars that they overhauled themselves.  Novas, Mustangs, Firebirds, GTOs-Goats, Mach II's, Trans Ams, Jaguar's and Corvettes.", "comment": "light mint green Ford Pinto - no, it never caught on fire.\n\nedited to add that my  parents had a \"Grabber Orange\" Ford Maverick", "upvote_ratio": 140.0, "sub": "AskOldPeople"}147{"thread_id": "ugav8y", "question": "I drove a maroon Chevy Vega with tan interior with poor transmission.   The guys used to drive fast cars and souped up cars that they overhauled themselves.  Novas, Mustangs, Firebirds, GTOs-Goats, Mach II's, Trans Ams, Jaguar's and Corvettes.", "comment": "I drove VW Beetles and learned to do my own maintenance and repairs from [The Idiot Book.](https://www.bing.com/images/search?view=detailV2&thid=AMMS_601051f457153cf31f77ffaffc574482&mediaurl=https%3a%2f%2fimages-na.ssl-images-amazon.com%2fimages%2fI%2f61J1ZJE3TQL.jpg&exph=475&expw=361&q=how+to+keep+your+volkswagen+alive+john+muir&FORM=IRPRST&selectedIndex=0&stid=83ff2e8d-6e89-9924-def5-b9dc4fe3e2d1&cbn=EntityAnswer&idpp=overlayview&ajaxhist=0&ajaxserp=0)  I got to the point where I could fix flats out on the road and swap engines in a couple of hours with a sheet of plywood, jacks and basic tools.  I bought my best seventies car, a 1973 Porsche 914, in the eighties.", "upvote_ratio": 70.0, "sub": "AskOldPeople"}148{"thread_id": "ugav8y", "question": "I drove a maroon Chevy Vega with tan interior with poor transmission.   The guys used to drive fast cars and souped up cars that they overhauled themselves.  Novas, Mustangs, Firebirds, GTOs-Goats, Mach II's, Trans Ams, Jaguar's and Corvettes.", "comment": "Never had a car until my 20s (1980s), but I had this in high school after I turned 16.  ['74 Kawasaki F7 175cc enduro](https://i.imgur.com/pVKbkue.jpeg)  If it was raining or too cold I got a ride from a classmate or my Dad dropped me off in his Jeep Wagoneer.", "upvote_ratio": 60.0, "sub": "AskOldPeople"}149{"thread_id": "ugddoc", "question": " \n\nHello everyone!\n\nI am new to this sub and to the field of computer science. So please explain easy and simple as possible (treat me like 7-year-old kid and sorry for the bad English).\n\nSo, I am currently reading a book about computer science, and I've encountered a problem on computing system. The book's definition of computing system is \"All basic hardware and software that work together to run program.\" At the end of the chapter, the book asked the question: \"What is a computing system and provide examples of computing systems.\" I wrote CPU, GPU, RAMS and memory cards as examples of computing systems, but the answer from the book said, \"A computing system is any kind of computing devices such as laptops, phones, and tablets.\"\n\nTo my understand, computing devices are things that have both hardware and software, however my answers are simply the hardware. But when I searched examples of computing systems on Google, there were keyboards, barcode scanner, and touchscreen and I don't think these are examples of computing devices which is not right to the definition from the book (isn't keyboard just input device (hardware)?)\n\nSo, can anyone explain what computing system is (if the book's definition is not good or if you have better definition) and examples of computing systems? Also do CPU, GPU, RAMS and memory cards can be considered as computing systems? Lastly, does \"Computing System\" the same thing as \"Computer System\"?\n\nAny help would be appreciated.\n\nThank you!", "comment": "No the book is right in both scenarios, but it wasn't a very well written question. \n\nThink of a \"computing system\" as absolutely anything that involves a computer or computer network. \n\nAll of those items you were listing were hardware components of a computing system.\n\nA web sever like \"Apache tomcat\" would be am example of a software component of a computing system. \n\nA computing system could be the phone in your hand, the cell towers that make it connect to the world, the wires and network adapters and routers and everything I'm between. \nIt could also be the POS system in a restaurant. \nThe cash registers at your local deli. \n\nThe entire financial system. \nYour bank. \nYour car's ECU, and various sensors. \n\n\nA gpu, cpu, ram, etc... those are hardware components that may or may not be used in a computing system. \n\nEmbedded software would also count by the way... embedded software is like... think...a child's fire truck toy, with lights and sirens. That is also a computer system. It has a small computer that plays the sound, and controls the lights, and listens for user input (the kid pressing the button).", "upvote_ratio": 30.0, "sub": "AskComputerScience"}150{"thread_id": "uge6w2", "question": "Yeah I know this wasn't that long ago, but I'm too young to remember this event. How big was it really? Did it affect regular people?", "comment": "If you were working for dot coms like I did it was a very big deal.     The world ended.     It was a litany of dot failures.    Non web companies weren't hiring either.    It was like a game of musical chairs ended and there were no chairs.\n\nSan Francisco went from being an unbearable boom town to a ghost town in a matter of months. \n\nIf you were not in tech you might not have noticed, however.    I remember talking to folks in other parts of the country and they weren't affected at all.", "upvote_ratio": 310.0, "sub": "AskOldPeople"}151{"thread_id": "uge6w2", "question": "Yeah I know this wasn't that long ago, but I'm too young to remember this event. How big was it really? Did it affect regular people?", "comment": "It was terrible. I was in tech, but working for a university, so I thought I was safe. But with the stock market tanking, the endowment shrank. The university cut back and laid me off. And there were NO tech jobs. Nobody was hiring. And if they were you were competing with all the other laid off workers. I was in my mid 40s without the latest and greatest skills.\n\nI sold everything and went from a luxurious 2br apartment to a tiny studio in a meh neighborhood, hoping to make my money last. I gave up on tech. Started volunteering for social service agencies, considered getting a degree in social work. Ended up getting a paying job at one - at 1/4  of my former salary. Relaxing, feel-good work, though. And I was kind of burned out on tech. If it hadn't been for the dot com crash I probably wouldn't have left. So it all worked out.", "upvote_ratio": 180.0, "sub": "AskOldPeople"}152{"thread_id": "uge6w2", "question": "Yeah I know this wasn't that long ago, but I'm too young to remember this event. How big was it really? Did it affect regular people?", "comment": "When looking back on it and hearing people talk about it, it sounds like it was a quick crash. It wasn\u2019t. It was long and drawn out and businesses were trying their best to survive as long as they could, but eventually the layoffs started and didn\u2019t stop until the majority of the tech startups had gone out of business. I was one of the last at the company I worked at. Eventually the last 8 or so of us were called to a meeting and told they were shutting down.", "upvote_ratio": 110.0, "sub": "AskOldPeople"}153{"thread_id": "ughqt2", "question": "How do quantum computers processing power compare with the computing power of 3D chips of classical binary computers?", "comment": "Classical computation fundamentally boils down to logic gates, with basic operations of AND, OR and NOT.  Each of these takes one or two bits as input and returns one bit as output.  A bit is a single value which is logically true or false, and may be represented in a physical computer by the presence or absence of a voltage.\n\nMany of the classical logic gate operations are irreversible: for example, given the operation 1 OR 0 = 1, the inputs cannot be retrieved if you only know the output.  Landauer's principle, which is proven experimentally, states that there is a minimum energy required for an irreversible single-bit operation.  This establishes an upper bound on the amount of classical computation that can be performed using a given amount of energy.  This limit is millions of times faster than any actual computers we know how to build, but it still establishes a theoretical \"fastest possible computer\" that can be used in, for example, estimating the strength of cryptosystems.\n\nQuantum computers escape this limit by doing almost all of their work using reversible operations.  There is no theoretical minimum energy required for this, so (as far as I know) we do not know an upper bound for the \"fastest possible quantum computer.\"  In order to do useful work using reversible operations, a different system is used.  Instead of bits we have qubits, which are just probabilistic bits.  A classical bit can only say \"this is definitely 0\" or \"this is definitely 1\" but a qubit can say things like \"this has a 60% chance of being 1.\"  There are a bunch of reversible gates with names like the Pauli gate, Hadamard gate, etc.  The details won't fit into a reddit comment, but these gates allow you to construct algorithms - but they're _different_ algorithms than the ones we know using classical gates.  One famous example is Shor's algorithm, which factors large numbers with asymptotic time complexity O((log n)^(3)) (or perhaps a little better).  Cryptosystems that depend on the difficulty of factoring large numbers, like RSA, may become vulnerable after we succeed in building large enough quantum computers.  Currently, the quantum computers we can actually build are very tiny - the largest number we have actually factored using a real quantum computer is 56153.  There are also crucial technical limitations on current quantum computers, like noise, precision and so on.  So RSA is safe for a while yet.\n\nBut even if we learn to build large-scale quantum computers, that doesn't mean they are \"more powerful\" than classical computers.  They just do different things, and in some ways are far less powerful.  They are _not_ universal Turing machines - quantum computers don't have looping, conditionals, etc.  So there are many important classical algorithms that cannot, even in principle, be executed on a quantum computer, no matter how large.  In the future there might be devices that combine the features of both classical and quantum computing, but we're nowhere close to this yet.  For the immediately foreseeable future, quantum computers will only function as a coprocessor attached to a classical computer, with the classical computer handling everything except the actual parallel computation.  (One example: nobody's crazy enough to try to write a TCP stack in quantum gate logic, and even if they were, it would be a monumental waste of qubits.  So a classical computer will always be needed if we want our quantum computer to be accessible over a network.  This means we can't combine quantum computers into distributed systems.)\n\nIt's a really interesting field that I wish I had more opportunity to be involved with.", "upvote_ratio": 280.0, "sub": "AskComputerScience"}154{"thread_id": "ughqt2", "question": "How do quantum computers processing power compare with the computing power of 3D chips of classical binary computers?", "comment": "[deleted]", "upvote_ratio": 30.0, "sub": "AskComputerScience"}155{"thread_id": "ugksmb", "question": "Hi, I have a program that interacts with a whole bunch of crates that have their own error types. I also have my own. In total there are like 4 or 5; the standard error, actix-web, reqwest, geojson parsing, xml parsing.\n\nHow do I let these errors bubble through the program? I get that I return result<T, Error> from function calls, but afaik I cannot mix error types right? Does that mean I have to 'convert' error types in different stages of the program? \n\nI was hoping there was some kind of way to rely on the fact that they all implement the same trait", "comment": "I would suggest using [thiserror](https://docs.rs/thiserror/latest/thiserror/) crate or [anyhow](https://docs.rs/anyhow/latest/anyhow/) crate - depending on the usage of the errors thrown by your project.\n\nIs your project a library (and the errors should be usable for anyone using your lib) or do you want to react in a special way to some of those errors from other crates? If so, then use `thiserror` - it will help you build new error types (meaningful to you or users of your lib) by wrapping the errors from different crates.\nThere are a lot of attributes that you can add to your errors to make them more usable (e.g. include the sourcing error inside your error struct/enum variant). \n\nIf you're building a binary application (e.g. a CLI) and the errors should just be reported to the user and the application should stop working - use anyhow. This will wrap the errors thrown by other crates \"automatically\", you just need to specify that your result type is either `anyhow::Result<YourType>` or `Result<YourType, anyhow::Error>` (these are equivalent, anyhow's Result type is an alias for the latter). The `anyhow` can also give you the option to pass more context to the application user so they can try to figure out what to do to fix the error (e.g. point to them that some file named `config.yml` should exist, but it's not).\n\nI'm a beginner in Rust but this is what I've seen being done so far and that's what I'm using in my projects. \n\nProbably there is a way also to combine both of them, but I've never done something like this and I'm not quite sure if this is a good idea.\n\nBased on the crates you've listed I assume you're writing some kind of backend service - for the start I'd use anyhow, just for simplicity's sake.\nIf you would see later on that you need to handle some of the errors differently, I'd move those errors to another error type using `thiserror`.\n\nEdit: fixed typos", "upvote_ratio": 50.0, "sub": "LearnRust"}156{"thread_id": "ugl5z8", "question": "I am looking for help understanding how to solve this. Not the answer. Thank you", "comment": "Bunch of print to consoles would probably work, and if it works it works\n\nI take it you're an absolute beginner?", "upvote_ratio": 90.0, "sub": "AskComputerScience"}157{"thread_id": "ugl5z8", "question": "I am looking for help understanding how to solve this. Not the answer. Thank you", "comment": "I am irritated that the pole is not at the middle", "upvote_ratio": 70.0, "sub": "AskComputerScience"}158{"thread_id": "ugl5z8", "question": "I am looking for help understanding how to solve this. Not the answer. Thank you", "comment": "Ask yourself how do I print a X , and how do I print a space ? And then go from there", "upvote_ratio": 30.0, "sub": "AskComputerScience"}159{"thread_id": "ugodyc", "question": "How did your injuries and near-death experiences from unsafe equipment make you the person you are today?", "comment": "Tetherball wrapping around the pole and hitting me in the face .", "upvote_ratio": 520.0, "sub": "AskOldPeople"}160{"thread_id": "ugodyc", "question": "How did your injuries and near-death experiences from unsafe equipment make you the person you are today?", "comment": "[deleted]", "upvote_ratio": 460.0, "sub": "AskOldPeople"}161{"thread_id": "ugodyc", "question": "How did your injuries and near-death experiences from unsafe equipment make you the person you are today?", "comment": "The seesaw helped you figure out which of your friends could be trusted.", "upvote_ratio": 390.0, "sub": "AskOldPeople"}162{"thread_id": "ugpvex", "question": "So I'm still fairly new to Rust, I've worked on some projects but all of them were sync. \n\nI've been hearing some opinions on async Rust and I wanted to see what the general consensus was - is it really more complicated and less ergonomic than the rest of the language, or am I just hearing a vocal minority?\n\nRust is an extremely elegant language in my opinion so wanted to hear more about this aspect.\n\nI have played around with `tokio` and such a bit and apart from cases of `.x().await?.y().await?` which aren't a huge issue but are a bit less clean, I haven't seen anything to indicate an issue.\n\nI'm aware of async traits not being stable but there are workarounds.\n\nWhat do you think?\n\nThanks!", "comment": "I believe async is *alright*, it's generally less polished and you will eventually run into confusing error messages if you work with async functions, because they are a bit too much magic.\n\nAs a backend developer I encounter async a lot in my daily job and these async-related wtfs come up once every two months or so, and are easy to resolve but YMMV.\n\nAltogether I would not avoid async due to its issues, it can be very useful.\n\nI remember cursing at the following off the top of my head:\n- Using mutexes without care in an `async fn` can be a huge footgun\n- `async fn`-s may implicitly capture all arguments, including `&self`, and `async fn foo(&self) -> usize { 2 }` will not be a `'static` future, this can be solved by rewriting the function to return a future and async block instead: `fn foo(&self) -> impl Future<Output = 2> + 'static { async { 2 } } `.\n- Using `!Send` values across `.await` points when the future is expected to be `Send` will make the compiler go crazy, it will tell the problem but won't tell you where it is exactly.\n\nNote that the lifetime issues might be caused by `async-trait`, and will not happen with regular `async fn`s, I don't remember.", "upvote_ratio": 130.0, "sub": "LearnRust"}163{"thread_id": "ugpvex", "question": "So I'm still fairly new to Rust, I've worked on some projects but all of them were sync. \n\nI've been hearing some opinions on async Rust and I wanted to see what the general consensus was - is it really more complicated and less ergonomic than the rest of the language, or am I just hearing a vocal minority?\n\nRust is an extremely elegant language in my opinion so wanted to hear more about this aspect.\n\nI have played around with `tokio` and such a bit and apart from cases of `.x().await?.y().await?` which aren't a huge issue but are a bit less clean, I haven't seen anything to indicate an issue.\n\nI'm aware of async traits not being stable but there are workarounds.\n\nWhat do you think?\n\nThanks!", "comment": "I don't have a ton of experience with async code myself, but I see lots of examples where the solution to some problem is something like `Pin<Box<dyn Future<Output = ...>>>`. This combines several different language features that tend to be less familiar to beginners:\n\n- Both `Pin` (edit: woops I meant `Unpin`) and `Future` are traits, and they both combine beefy APIs with relatively subtle documented requirements and guarantees. Understanding every last detail of `Pin` isn't necessary to write most async code, but it does sometimes come up.\n\n- `Box<dyn Future<...>>` is a dynamic trait object. Often we just don't have to think about these, but they're another important moving part in Rust that comes with some nontrivial restrictions, like the concept of [\"object safety\"](https://doc.rust-lang.org/reference/items/traits.html#object-safety).\n\nIf you've already played around with traits and gotten familiar with associated types and generic bounds and things like that,`Future` and `Pin` might be no sweat. On the other hand, if you haven't yet gotten much exposure to traits, async Rust might force you to learn a lot all at once.", "upvote_ratio": 30.0, "sub": "LearnRust"}164{"thread_id": "ugqqox", "question": "How did the 2007 recession mold you financially? Did it change the way you saved?", "comment": "Yes!  I saw the downturn as a chance to dump a bunch of money into retirement investments, knowing that eventually it was going to turn around. \n\nIt was literally the \u201cbuy low (wait to retire) sell high\u201d investment period. I gained years of retirement savings I wouldn\u2019t have had if the market just stayed on slow growth.", "upvote_ratio": 230.0, "sub": "AskOldPeople"}165{"thread_id": "ugqqox", "question": "How did the 2007 recession mold you financially? Did it change the way you saved?", "comment": "No.  I sold my house at the top of the top of the market on the west coast and 6 months later bought a house at the bottom of the market on the east coast.   In 2015, I sold the east coast house and bought a house in Arizona just before the market doubled here.\n\nI turned $200K of equity in to $2M through a combination of dumb luck and good timing.", "upvote_ratio": 140.0, "sub": "AskOldPeople"}166{"thread_id": "ugqqox", "question": "How did the 2007 recession mold you financially? Did it change the way you saved?", "comment": "It made me ignore the swings (both big and small) when it comes to investing.  I was reading everything I could about the economy, the roots of the problems, how QE works, derivatives, what caused the housing crisis, etc.  I found it absolutely fascinating however I also found out that it was easy to get into the doom & gloom mindset. Luckily that phase didn\u2019t last long and I pretty much stayed the course and obviously my investments recovered.\n\nNow, I\u2019m pretty numb to the daily swings.  I still enjoy reading about the markets but I take it all with a grain of salt and look at the overall picture.  I see people worrying about how much they\u2019ve lost this year but completely ignoring how much they\u2019ve gained over the last 10.  I\u2019m still following the same path for the most part (401k, dollar-cost-averaging) but I am more aggressive with my personal investment accounts when I see the opportunity.\n\nAnother by-product of living through that.  It probably helped me to handle world-wide issues better.  When the pandemic hit, I didn\u2019t rush out and panic.  My family focused on what we could do rather than freak out about the outside world.  From an investment perspective, I invested a lot more than normal in March of 2020 and that worked out well.", "upvote_ratio": 130.0, "sub": "AskOldPeople"}167{"thread_id": "ugsvmt", "question": "Hello,\n\nTher's a tiling window manager (based on Penrose library) written in Rust which I'm trying to make it run on Alpine Linux.  However,  after compiling when trying to run the binary I get  a \"Segmentation fault\" error. From  my basic undersating this must be compiled with \"--target x86\\_64-unknown-linux-musl\" but I'm still getting the same error.\n\nCan someone help me with this please?\n\nthanks", "comment": "You could share the logs for starters. Set RUST_BACKTRACE=full and run in debug mode. \n\nDid you test the app on a different OS, or is this Alpine specific? Segmentation fault after the program compiled fine is suspect.", "upvote_ratio": 40.0, "sub": "LearnRust"}168{"thread_id": "ugtva6", "question": "If you're a fresh Rust developer, here's a great mentorship opportunity", "comment": "\"The program requires a commitment of 170 to 340 hours for three to six months\"\n\nThat big a commitment without any pay? That's ridiculous.", "upvote_ratio": 150.0, "sub": "LearnRust"}169{"thread_id": "ugtva6", "question": "If you're a fresh Rust developer, here's a great mentorship opportunity", "comment": "I may be wrong but it looks like an unpaid internship, isn't it ?", "upvote_ratio": 60.0, "sub": "LearnRust"}170{"thread_id": "ugtva6", "question": "If you're a fresh Rust developer, here's a great mentorship opportunity", "comment": "What\u2019s the difference between this and an unpaid internship?", "upvote_ratio": 60.0, "sub": "LearnRust"}171{"thread_id": "uh61ji", "question": "Consider a complete graph with nonnegative weighted edges, arranged in a circle.  A triangulation of a complete graph is a subgraph such that no edges in it are crossing, but adding any edge would cause edges to cross.  I want to find an efficient algorithm to find a triangulation of maximum total weight.  \n\nIt's clear that as you go around the edge of the circle each edge will be added since they are nonnegative and can never cause a crossing.  \n\nI initially thought of greedy algorithms but I don't think any of them work.  \n\nI also tried considering a divide-and-conquer algorithm, like taking any vertex and iterating through all of the edges that one could select containing it, finding the maximal triangulation of the subgraph on either side of the edge.  However, when I analyzed the runtime of this it seemed exponential and therefore not efficient.", "comment": "> I also tried considering a divide-and-conquer algorithm, like taking any vertex and iterating through all of the edges that one could select containing it, finding the maximal triangulation of the subgraph on either side of the edge. However, when I analyzed the runtime of this it seemed exponential and therefore not efficient.\n\nAre you sure? I haven't worked out all the details, but it seems to me that with this approach there would be O(n^(2)) subproblems, each of which can be handled in O(n) time, which means you can use dynamic programming to get an overall time complexity of O(n^(3)). (Each subproblem corresponds to an interval between some starting and ending node on the circle, and its solution is the maximum total weight that can be obtained using only the nodes and edges within that interval.)", "upvote_ratio": 30.0, "sub": "AskComputerScience"}172{"thread_id": "uh8cxq", "question": "I love all The New Rascals songs, especially the song, How Can I Be Sure sung by Eddie Brigati.", "comment": "There's just too many to name .......but easily one of the most underrated bands are The Kinks, the put out 5 or 6 straight great albums starting in 1966 and hardly anyone seemed to notice at that time. They had been banned from performing live in the U.S.\n\nThe Rolling Stones put out some damn good music on 4 straight albums starting in 1968: Beggars Banquet, Let it Bleed, Sticky Fingers, and Exile on Main Street. 2 great non-lp singles at the same time: Jumping Jack Flash and Honky Tonk Women.\n\nThen there's Led Zeppelin, Pink Floyd, and those 3 great mid-70's Queen albums: Sheer Heart Attack, A Night at the Opera, and A Day at the Races.", "upvote_ratio": 60.0, "sub": "AskOldPeople"}173{"thread_id": "uh8cxq", "question": "I love all The New Rascals songs, especially the song, How Can I Be Sure sung by Eddie Brigati.", "comment": " Not big into favorites - I find them too limiting - but you asked about what was a golden age of music for me:\n\nSimon and Garfunkel, Beatles, Rolling Stones, Bob Seger, Motown, The Who, Creedence Clearwater, Three Dog Night, Guess Who, Eagles, Elton John, Led Zeppelin, Rod Stewart, James Taylor, Joni Mitchell, Crosby Stills Nash and sometimes Young. Kinks. Bee Gees before Disco, Alice Cooper. It goes on an and on and on.", "upvote_ratio": 50.0, "sub": "AskOldPeople"}174{"thread_id": "uh8cxq", "question": "I love all The New Rascals songs, especially the song, How Can I Be Sure sung by Eddie Brigati.", "comment": "Early 60's was The Beach Boys Three Dog Night and the Byrds.  Then The Who, Humble Pie, Grateful Dead, Allman Bros. Band, Dave Mason, Deep Purple, CCR, John McLaughlin and the Mahavishnu Orchestra, Jefferson Airplane/Starship, Steve Miller Band and a whole lot of other bands.  I got in to \"undergrand FM\" in the L.A. area (KNAC, KPPC, KMET and KLOS).  Lots of good music and concerts going around then.", "upvote_ratio": 40.0, "sub": "AskOldPeople"}175{"thread_id": "uhg8t1", "question": "What was it like to be part of the fight for the right to obtain a safe legal abortion?", "comment": "My beloved grandma - white, happily married, solidly middle class - almost died from blood loss while lying on her dining room table in the 50s following a \"successful\" abortion. She suffered for years afterwards. \n\nMy wife and I protested in DC in the late 80s to protect pro-choice laws.\n\nIt felt important then, it's just as important now. \n\nAmerica's slide into a white Christian fascist oligarchy has been depressing to experience.", "upvote_ratio": 2600.0, "sub": "AskOldPeople"}176{"thread_id": "uhg8t1", "question": "What was it like to be part of the fight for the right to obtain a safe legal abortion?", "comment": "What's it like??\n\nIt's like being the smartest, most compassionate person in a room where the people with single digit IQs and allergies to facts are making decisions. \n\nIt's like knowing the shortsightedness of the GOP will backfire spectacularly, but not before innocent lives are lost *( not talking about the fetus).  \n\nIt's like having someone tell me that I can't masturbate on Sunday because they think I should be at church. \n\nIt's like yelling into a void because you know that the people on the opposing team don't give two shits about babies once they're born, but they'll \"fight for their right to live.\"\n\nThey want them BORN. Not HOUSED. Not FED.  Not CARED FOR.\n\nIf they were *really* pro-life, then they'd give a shit after the baby was born. \n\nThey don't, however, and the policies of the party for which they vote clearly reflect this. \n\nThey just can't be bothered to give a shit, no matter how much lip service they pay to the topic. \n\nTheir actions speak clearly on their behalf. And their actions tell you that, as a woman , you have zero say in what happens while you are pregnant. \n\nAny of you, whether you have a penis or a vagina, who is fine with your neighbors being able to dictate whether or not you carry a pregnancy, any of you who believe you deserve a say in another woman's choice to end a pregnancy, can go str8 to hell and take your beliefs with you. \n\nThe only person you get to make reproductive decisions for is the one in the mirror. \n\nDisagree?  You can die mad about it.", "upvote_ratio": 1470.0, "sub": "AskOldPeople"}177{"thread_id": "uhg8t1", "question": "What was it like to be part of the fight for the right to obtain a safe legal abortion?", "comment": "As an older woman, I will tell you that I am terrified for my granddaughter. I'm afraid for the girls she will grow up with, I'm even scared for her idiot mother. People are going to die because of this ruling. I literally,as in dictionary definition, just saw a headline that said the SC said that the leaked draft is authentic, and that Roberts is launching an investigation into the leak. I find it pathetic that they are more concerned about punishing the person who leaked this information than the people who's lives will end because of this ruling. Our grandchildren will be the people dying. \n\nLet that sink in. Someone reading this will attend a funeral caused by an unsafe abortion.", "upvote_ratio": 1240.0, "sub": "AskOldPeople"}178{"thread_id": "uhgmwl", "question": "What degree complements computer science other than science degrees like math, physics, engineering, etc?", "comment": "Linguistics, operations research.", "upvote_ratio": 240.0, "sub": "AskComputerScience"}179{"thread_id": "uhgmwl", "question": "What degree complements computer science other than science degrees like math, physics, engineering, etc?", "comment": "Pretty much all of them.\n\nThe strength of Computer Science lies in it being able to be comboed with almost anything. That said, of course some are maybe a bit better than others. Mathematics, and the natural sciences (physics, biology, earth sciences, to a lesser degree chemistry) are obvious picks.\n\nPhilosophy is of course a very sensible combination as well, Oxford university offers a CS+Phil degree for example: [https://www.ox.ac.uk/admissions/undergraduate/courses/course-listing/computer-science-and-philosophy](https://www.ox.ac.uk/admissions/undergraduate/courses/course-listing/computer-science-and-philosophy)\n\nIf you are especially interested in the business side of CS, then of course business related degrees are great. Economics, business, finance, psychology, media and communication are all possible combos that can be useful in the business arena.\n\nIf you are most interested in AI/cognitive science, then psychology, linguisitics, neurobiology are all very desirable options.", "upvote_ratio": 210.0, "sub": "AskComputerScience"}180{"thread_id": "uhgmwl", "question": "What degree complements computer science other than science degrees like math, physics, engineering, etc?", "comment": "Business, Management/Engineering Management, Psychology (for UX)", "upvote_ratio": 140.0, "sub": "AskComputerScience"}181{"thread_id": "uhhvv1", "question": "I have a function like this\n\n    fn evaluate<T>(&self, s: &State, a: Option<T>) -> Option<T>\n        where\n            T: num::PrimInt + std::iter::Sum + WrappingAdd + WrappingSub,\n\nAnd now I realize I need to know the width of the argument.\n\n(For context, this is part of something which needs to emulate part of the [STM8 instruction set](https://www.st.com/resource/en/programming_manual/cd00161709-stm8-cpu-programming-manual-stmicroelectronics.pdf). This instruction set has many operations which can take either an 8-bit operand or a 16-bit operand, hence the Generics. But I'm particularly getting stuck on the SWAP instruction. The SWAP instruction takes two halves of the operand, and swaps them over. For example, 0x1f becomes 0xf1, but 0x1234 becomes 0x3412.)\n\nI'm looking for something like `T::width()` or something that can tell me where to actually split the word, but I can't seem to find it. Does anyone here know? Or am I simply taking the wrong approach here?\n\nEDIT: Apologies for the goofy title; I realized after I posted it there's probably a clearer way to phrase the problem", "comment": "You could possibly use [std::mem::size\\_of<T>()](https://doc.rust-lang.org/std/mem/fn.size_of.html) but that does return the aligned size rather than the raw size, however this is equal for most primitive number types so if that covers your use case then great.\n\nThe other option would be to define your own trait with a `width` function and implement that trait for all supported types, for example:\n\n    trait SwapArgument\n    {\n        fn width() -> usize;\n    }\n    \n    impl SwapArgument for u16\n    {\n        fn width() -> usize\n        {\n            2\n        }\n    }", "upvote_ratio": 90.0, "sub": "LearnRust"}182{"thread_id": "uhhvv1", "question": "I have a function like this\n\n    fn evaluate<T>(&self, s: &State, a: Option<T>) -> Option<T>\n        where\n            T: num::PrimInt + std::iter::Sum + WrappingAdd + WrappingSub,\n\nAnd now I realize I need to know the width of the argument.\n\n(For context, this is part of something which needs to emulate part of the [STM8 instruction set](https://www.st.com/resource/en/programming_manual/cd00161709-stm8-cpu-programming-manual-stmicroelectronics.pdf). This instruction set has many operations which can take either an 8-bit operand or a 16-bit operand, hence the Generics. But I'm particularly getting stuck on the SWAP instruction. The SWAP instruction takes two halves of the operand, and swaps them over. For example, 0x1f becomes 0xf1, but 0x1234 becomes 0x3412.)\n\nI'm looking for something like `T::width()` or something that can tell me where to actually split the word, but I can't seem to find it. Does anyone here know? Or am I simply taking the wrong approach here?\n\nEDIT: Apologies for the goofy title; I realized after I posted it there's probably a clearer way to phrase the problem", "comment": "Since you have a well-defined universe of possible types, I would be inclined to implement the actual swap as a trait on `u8` and `u16`\u00b9 and then have the generic bounded on that trait and call the trait method. This way your code would avoid an `if` branch on the static size and since the logic for an 8-bit value is going to be very different than the logic for a 16-bit value since the former needs to operate on bits while the latter on bytes (and may well compile to a single instruction in machine code).\n\nE.g.,\n\n    trait Swap<T> {\n        fn swap(self) -> Self;\n    }\n    \n    impl Swap for u8 {\n        fn swap(self) -> u8 {\n            self.rotate_right(4)\n        }\n    }\n    \n    impl Swap for u16 {\n        fn swap(self) -> u16 {\n            self.swap_bytes()\n        }\n    }\n\n\u2e3b\n\n1. Assuming of course that these would be the correct types and not `i8` and `i16`.", "upvote_ratio": 60.0, "sub": "LearnRust"}183{"thread_id": "uhhvv1", "question": "I have a function like this\n\n    fn evaluate<T>(&self, s: &State, a: Option<T>) -> Option<T>\n        where\n            T: num::PrimInt + std::iter::Sum + WrappingAdd + WrappingSub,\n\nAnd now I realize I need to know the width of the argument.\n\n(For context, this is part of something which needs to emulate part of the [STM8 instruction set](https://www.st.com/resource/en/programming_manual/cd00161709-stm8-cpu-programming-manual-stmicroelectronics.pdf). This instruction set has many operations which can take either an 8-bit operand or a 16-bit operand, hence the Generics. But I'm particularly getting stuck on the SWAP instruction. The SWAP instruction takes two halves of the operand, and swaps them over. For example, 0x1f becomes 0xf1, but 0x1234 becomes 0x3412.)\n\nI'm looking for something like `T::width()` or something that can tell me where to actually split the word, but I can't seem to find it. Does anyone here know? Or am I simply taking the wrong approach here?\n\nEDIT: Apologies for the goofy title; I realized after I posted it there's probably a clearer way to phrase the problem", "comment": "In case you do ever need to actually get the concrete type instead of just using the size, the trait bound you will need is the [Any Trait](https://doc.rust-lang.org/std/any/trait.Any.html) which allows down casting an opaque type to a concrete type, though it does require `'static`", "upvote_ratio": 30.0, "sub": "LearnRust"}184{"thread_id": "uhjd3h", "question": "We are announcing a temporary moratorium on posts related to abortion, the Supreme Court and the leaked draft. We will review this before the weekend, and may post a megathread, but our current expectation is that a moratorium outside a megathread will last until the full release of the *Dobbs v. Jackson Women's Health* order, or further news or statements from the Court provide a more complete story which will make us reconsider.\n\nThis is a historic moment, and we recognize that. There has not been a decision leak from SCOTUS in nearly 40 years, and never in history has a draft been leaked. Discussions about just this relatively apolitical event might have been welcomed.\n\nHowever, adding in the very contentious issue of abortion, a draft that is months old, and lack of any official news or statements, the comments and posts we have seen so far are not constructive to the purpose of this subreddit.\n\nWe must stress that while this is a subreddit about our culture, it is *not* a current events, debate, political news or conspiracy subreddit. People are understandably having very strong responses to this, and looking to vent with like-minded others. We try to keep things civil here, and part of that is waiting until there is more information and people are less reactionary to this shocking event.", "comment": "When discussing the matter from this point forward we have to refer to it as a \"special operation\".", "upvote_ratio": 900.0, "sub": "AskAnAmerican"}185{"thread_id": "uhjd3h", "question": "We are announcing a temporary moratorium on posts related to abortion, the Supreme Court and the leaked draft. We will review this before the weekend, and may post a megathread, but our current expectation is that a moratorium outside a megathread will last until the full release of the *Dobbs v. Jackson Women's Health* order, or further news or statements from the Court provide a more complete story which will make us reconsider.\n\nThis is a historic moment, and we recognize that. There has not been a decision leak from SCOTUS in nearly 40 years, and never in history has a draft been leaked. Discussions about just this relatively apolitical event might have been welcomed.\n\nHowever, adding in the very contentious issue of abortion, a draft that is months old, and lack of any official news or statements, the comments and posts we have seen so far are not constructive to the purpose of this subreddit.\n\nWe must stress that while this is a subreddit about our culture, it is *not* a current events, debate, political news or conspiracy subreddit. People are understandably having very strong responses to this, and looking to vent with like-minded others. We try to keep things civil here, and part of that is waiting until there is more information and people are less reactionary to this shocking event.", "comment": "I\u2019ll make sure to have popcorn ready for sale in the megathread", "upvote_ratio": 790.0, "sub": "AskAnAmerican"}186{"thread_id": "uhjd3h", "question": "We are announcing a temporary moratorium on posts related to abortion, the Supreme Court and the leaked draft. We will review this before the weekend, and may post a megathread, but our current expectation is that a moratorium outside a megathread will last until the full release of the *Dobbs v. Jackson Women's Health* order, or further news or statements from the Court provide a more complete story which will make us reconsider.\n\nThis is a historic moment, and we recognize that. There has not been a decision leak from SCOTUS in nearly 40 years, and never in history has a draft been leaked. Discussions about just this relatively apolitical event might have been welcomed.\n\nHowever, adding in the very contentious issue of abortion, a draft that is months old, and lack of any official news or statements, the comments and posts we have seen so far are not constructive to the purpose of this subreddit.\n\nWe must stress that while this is a subreddit about our culture, it is *not* a current events, debate, political news or conspiracy subreddit. People are understandably having very strong responses to this, and looking to vent with like-minded others. We try to keep things civil here, and part of that is waiting until there is more information and people are less reactionary to this shocking event.", "comment": "But we can still discuss the weather, right?", "upvote_ratio": 730.0, "sub": "AskAnAmerican"}187{"thread_id": "uhm9c9", "question": "Were you looking for it, just happened at random, was something \u201carranged\u201d (like actually arranged or even a blind date)?", "comment": "I was just 19 and was already sick of the kind of guys that were always ready to jump my bones but never put anything into any kind of real connection.  I took a look at myself and honestly assessed the kind of guy that would be good for me and also the kind of guy I'm attracted to. And I was sure it would take forever to find him but I would persevere and ignore all the ones that would be no good. \n\nHe showed up about 2 weeks later although it took quite a few months for me to decide maybe he was the one. We've been married since 1980.  No regrets. It's been a ride - not exactly first class but a lot more fun and never boring.  I never really cared about having it all. I only needed enough and I have a lot more than that. Now if only we could actually retire...", "upvote_ratio": 90.0, "sub": "AskOldPeople"}188{"thread_id": "uhm9c9", "question": "Were you looking for it, just happened at random, was something \u201carranged\u201d (like actually arranged or even a blind date)?", "comment": "\\> Have you ever found love? If yes, when?\n\nMultiple times.! Most recently with the wonderful woman I married several  decades ago. Many years, six kids, and a bunch of grandkids ago, we're still very much in love and  incredibly happy to be together.", "upvote_ratio": 50.0, "sub": "AskOldPeople"}189{"thread_id": "uhm9c9", "question": "Were you looking for it, just happened at random, was something \u201carranged\u201d (like actually arranged or even a blind date)?", "comment": "I was (1970) 18. She was 16. My sister, with whom I was very close (J.D. Salinger \"Franny & Zooey\" close) introduced us. We have been married 47 years this year. She has put up with a lot of my shenanigans, but it has never been boring. We have three children who tell us their love lives were ruined because they cannot aspire to the relationship my wife and I have. We are old now and beginning to talk about what happens when one of us must go.", "upvote_ratio": 50.0, "sub": "AskOldPeople"}190{"thread_id": "uhma4e", "question": "Hi,\n\nI'm slowly learning that comparing programming environments is hard and its almost impossible to say that one language will always be faster than another for certain use cases..\n\nHowever I ran into something peculiar now.\n\nI have an application where I need to calculate the Intersection between polygons as part of an actix-web server. I need to do this between two groups of polygons. For this case consider a group of 300 polygons and another group (about 50). so 15.000 comparisons. This is not atypical.\n\nI have this application in Node, using the turf module. Results vary of course, but its not strange for this to happen in around 15 seconds in the Node version. Obviously I turned to rust to speed this up.\n\nI rewrote a prototype for this in Rust with the Geo crate, and.. it takes 26 seconds on average.\n\nFirst thing I checked: Am I building a debug build? Classic error. But I wasn't. \n\nCan someone shed some light on this?\n\nsome hypotheses:\n\n\\- The turf module in Node is not actually javascript under the hood?\n\n\\- I still have some build setting messed up somewhere", "comment": "Can you show some code? Try to run  benchmarks with flamegraph https://github.com/flamegraph-rs/flamegraph\n\nIt's possible that the node library has better optimizations.", "upvote_ratio": 80.0, "sub": "LearnRust"}191{"thread_id": "uhma4e", "question": "Hi,\n\nI'm slowly learning that comparing programming environments is hard and its almost impossible to say that one language will always be faster than another for certain use cases..\n\nHowever I ran into something peculiar now.\n\nI have an application where I need to calculate the Intersection between polygons as part of an actix-web server. I need to do this between two groups of polygons. For this case consider a group of 300 polygons and another group (about 50). so 15.000 comparisons. This is not atypical.\n\nI have this application in Node, using the turf module. Results vary of course, but its not strange for this to happen in around 15 seconds in the Node version. Obviously I turned to rust to speed this up.\n\nI rewrote a prototype for this in Rust with the Geo crate, and.. it takes 26 seconds on average.\n\nFirst thing I checked: Am I building a debug build? Classic error. But I wasn't. \n\nCan someone shed some light on this?\n\nsome hypotheses:\n\n\\- The turf module in Node is not actually javascript under the hood?\n\n\\- I still have some build setting messed up somewhere", "comment": "> First thing I checked: Am I building a debug build? Classic error. But I wasn't. \n\nNext big gotcha areas are memory fragmentation and zillions of unnecessary copies. Putting all of you polygons in a contiguous array will likely be much much faster than putting them behind something like a hash table (where they can be strewn about the memoryspace) because of how caches work and the batch nature of your problem. If things are contiguous, make sure you're traversing your arrays in a memory-friendly way such that the \"next\" thing you're processing is the next thing _in memory_ as much as possible. And making unnecessary copies is...unnecessary. Double check that you're not `clone()`ing things you could pass by reference.", "upvote_ratio": 50.0, "sub": "LearnRust"}192{"thread_id": "uhma4e", "question": "Hi,\n\nI'm slowly learning that comparing programming environments is hard and its almost impossible to say that one language will always be faster than another for certain use cases..\n\nHowever I ran into something peculiar now.\n\nI have an application where I need to calculate the Intersection between polygons as part of an actix-web server. I need to do this between two groups of polygons. For this case consider a group of 300 polygons and another group (about 50). so 15.000 comparisons. This is not atypical.\n\nI have this application in Node, using the turf module. Results vary of course, but its not strange for this to happen in around 15 seconds in the Node version. Obviously I turned to rust to speed this up.\n\nI rewrote a prototype for this in Rust with the Geo crate, and.. it takes 26 seconds on average.\n\nFirst thing I checked: Am I building a debug build? Classic error. But I wasn't. \n\nCan someone shed some light on this?\n\nsome hypotheses:\n\n\\- The turf module in Node is not actually javascript under the hood?\n\n\\- I still have some build setting messed up somewhere", "comment": "I had to make this kind of thinks to create a tile server in rust I used https://github.com/georust/rstar", "upvote_ratio": 30.0, "sub": "LearnRust"}193{"thread_id": "uhss9t", "question": "Anyone got bruised up using Click Clacks?", "comment": "Yes. Bruised forearms. Bruised foreheads. Bruised cheekbones. I don't know any kid who mastered them like the ones in the TV commercials. That was before CG, so the little monsters must've really learned how to do it.", "upvote_ratio": 180.0, "sub": "AskOldPeople"}194{"thread_id": "uhss9t", "question": "Anyone got bruised up using Click Clacks?", "comment": "Oh yes. We used to bring those to school and have contests to see who could move their hand in and out of their path unharmed. I used those until they shattered little pieces into my eyes or the string broke!  Good times.", "upvote_ratio": 120.0, "sub": "AskOldPeople"}195{"thread_id": "uhss9t", "question": "Anyone got bruised up using Click Clacks?", "comment": "Of course...downright black and blue forearms at times as a kid.\n\nSometimes more painful places like a forehead and I have a memory of clacking myself in a thoroughly double-over painful way down where the delicate bits are parked: Though I can't figure out quite how that happened 50 years later.\n\nAnd when the resin ball shattered, I remember there being blood.  Both my red clackers and orange clackers eventually shattered with projectile flesh damage.  Again, hard to remember if it was a Kid's version of blood where a pinprick looks like a garden hose or whether it was a bit more than that.", "upvote_ratio": 100.0, "sub": "AskOldPeople"}196{"thread_id": "uhtfb8", "question": "How many friends do you have and how often do you see them?", "comment": "Actual friends I enjoy?  3. \n\nI see them less often than I\u2019d like, but we text every day. \n\nAcquaintances bore me now. I\u2019d rather keep the circle small.", "upvote_ratio": 150.0, "sub": "AskOldPeople"}197{"thread_id": "uhtfb8", "question": "How many friends do you have and how often do you see them?", "comment": "1    ..My wifes good friends husband.   We have met 3 or 5 times? exchanged polite small talk about sports and the yard and the weather and went on our seperate ways.   I dont know his name and i dont think he knows mine.  We both are happy as can be with it.  If i see him again in 5 months or so its good.", "upvote_ratio": 110.0, "sub": "AskOldPeople"}198{"thread_id": "uhtfb8", "question": "How many friends do you have and how often do you see them?", "comment": "I have very few people who I'd rather be with, than be alone. It's nobody else's fault, I just like being alone.", "upvote_ratio": 90.0, "sub": "AskOldPeople"}199{"thread_id": "uhvegr", "question": "[Duncan Yo Yo's 1976](https://www.youtube.com/watch?v=dfqykR14O3Y)", "comment": "Never did. I couldn't do a single thing wih a yoyo.", "upvote_ratio": 50.0, "sub": "AskOldPeople"}200{"thread_id": "uhvegr", "question": "[Duncan Yo Yo's 1976](https://www.youtube.com/watch?v=dfqykR14O3Y)", "comment": "I could do \"around the world\" and \"walk the dog\".  Get a good quality yo-yo.  You basically fling it strongly off the top of your palm downwards, and it should stay spinning there.  Take it on a walk.  Give it a light yank, it comes back up.", "upvote_ratio": 30.0, "sub": "AskOldPeople"}201{"thread_id": "uhvegr", "question": "[Duncan Yo Yo's 1976](https://www.youtube.com/watch?v=dfqykR14O3Y)", "comment": "It was a huge fad at our school.  I was actually trying to remember if this came before or after the clickety clacks.  But for a while everyone had a yoyo. \n\nIIRC, the trick is in the tensioning of the string.  The string splits and rejoins around the hub, the center of the yoyo.  In normal use, the string twists and gets tighter around the hub.  So the trick is to extend the string and let it unwind (spin horizontally, not like a trick) then rewind it by hand.  When the string has slack the yoyo can loiter at the bottom of the throw.  Then you can do all the fancy tricks.  Jerking the string causes it to catch and climb the string again.  If you didn't want it to loiter you had to do a bunch of normal casts first.  If you did a normal underhand you put a half twist in every time you did it, so it tightened up. \n\nAt one time I could do all of these. It was required if you wanted to be cool in 4th grade.  Being cool was a trick I never mastered, but I could do the classic round the world, walk the dog, rock the baby.  I was no Tommy Smothers, (Mr. Yoyo) but I could do all right.  But the trick is properly tying and knotting the string.", "upvote_ratio": 30.0, "sub": "AskOldPeople"}202{"thread_id": "uhy9wd", "question": "Theoretically, could I create some sort of program to compile clips of every single time the word \u201cballs\u201d is said on any channel on my cable box for something like 20 years? Resources unlimited.", "comment": "Not sure if you could monitor every channel with one cable box, but if you found a way to do it then it's entirely possible.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}203{"thread_id": "uhy9wd", "question": "Theoretically, could I create some sort of program to compile clips of every single time the word \u201cballs\u201d is said on any channel on my cable box for something like 20 years? Resources unlimited.", "comment": "Especially if you decode the closed captioning. That would be much less work. \n\nYou would get lots of baseball broadcasts.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}204{"thread_id": "ui1ot6", "question": "Let's keep track of latest trends we are seeing in IT. What technologies are folks seeing that are hot or soon to be hot? What skills are in high demand? Which job markets are hot? Are folks seeing a lot of jobs out there? \n\nLet's talk about all of that in this thread!", "comment": "The floodgates are open. I haven't seen this many non-IT people trying to get into IT since the dot com days. This is creating a weird situation where although there are tons of open jobs, there are even more applicants competing for those jobs. This is primarily impacting the entry-level roles - there are still a lot of open positions above that that are hard to fill.\n\nAs usual, security is by far the most flooded. Most non-IT people aren't too familiar with what roles are available besides helpdesk and security, and not too many people have a goal of working at a helpdesk - so security seems to be the default. I'd estimate that ~50% of questions in here lately are from people outside of IT wanting to get into security. While it's true that there's a growing need for security professionals, [that need is not for entry-level people](https://www.reddit.com/r/SecurityCareerAdvice/comments/s319l5/entry_level_cyber_security_jobs_are_not_entry/). Read through [the wiki](https://www.reddit.com/r/ITCareerQuestions/wiki/index) if you need a better idea of what else is available within IT.\n\nSo what should you do to get into entry-level IT? There are 4 credentials/qualities that hiring managers look for:\n\n- 4-year Degrees: No, they're not required. Yes, they will set you apart from those that don't have one.  \n- Experience - this is a big differentiator, but not a lot of people trying to break in will have experience yet. Internships are the exception - always, always, always do an internship before you graduate.  Always.  \n- Certifications - great to have with or without a degree.  In addition to a degree, they'll make you stand out more.  If you don't have a degree, certs are the best way to show that you have tech knowledge.\n- Attitude - this is an often overlooked but critical aspect of the interview process. You can be the smartest IT person in the room, but if you can't deal with people, you can't showcase your skills, or you can't display good soft skills, you're going to be passed over for someone else who can.\n\nIf you're just graduating with a computer-related degree and you have at least one relevant internship completed, you'll be at the top of the list. Heck, you probably already have a job and don't even know this sub exists.\n\nIf you have any other 4-year degree, that counts as 'has a degree' to nearly all hiring managers. You don't have to go back for a computer-related degree.  Add a cert or 2 and you're read to apply.\n\nCerts are the next most powerful tool to get you in line if you don't have a degree - the CompTIA ones are the baseline if you don't know what else to do.\n\nIf you have no degree, no experience, no certs and want to break into IT, just ask yourself - what do you have to offer that people with those credentials don't have? If you don't know the answer, then you should probably look at certifications to start.\n\n**PAY:** Pay is climbing pretty steadily for experienced people. It gets said in here from time to time, but in no way is IT an underpaid field.  IT workers are some of the highest-paid white-collar professionals, right up there with engineers.  But it IS holding rather still for entry-level - this is just due to the huge oversupply of workers who all want a job. So yes, you might make the same (or less) than someone who works at McDonalds in order to break into the industry - this is not a reason to avoid IT. If you need an explanation of that, please brush up on the [present vs future value of money](https://www.differencebetween.com/difference-between-present-value-and-vs-future-value/).  If you still don't get it, take the McDonalds job.  \n\n(I reposted this from April since that one got lost)", "upvote_ratio": 340.0, "sub": "ITCareerQuestions"}205{"thread_id": "ui2cjr", "question": "I recently turned 20 and I\u2019m going through a thing where I\u2019m not quite sure how I\u2019m perceived. Am I a kid? Am I a grown up you view as a fellow adult? I want to know how you or general society sees someone my age as because I feel like it\u2019s sort of a weird middle stage", "comment": "You look like something that just hatched\u2014weirdly fragile and clumsy despite obvious physical vitality.", "upvote_ratio": 1990.0, "sub": "AskOldPeople"}206{"thread_id": "ui2cjr", "question": "I recently turned 20 and I\u2019m going through a thing where I\u2019m not quite sure how I\u2019m perceived. Am I a kid? Am I a grown up you view as a fellow adult? I want to know how you or general society sees someone my age as because I feel like it\u2019s sort of a weird middle stage", "comment": "20 year olds are baby adults.\n\nSelf-sufficient, but still not all the way formed.\n\nI would treat you as an adult, though.", "upvote_ratio": 1450.0, "sub": "AskOldPeople"}207{"thread_id": "ui2cjr", "question": "I recently turned 20 and I\u2019m going through a thing where I\u2019m not quite sure how I\u2019m perceived. Am I a kid? Am I a grown up you view as a fellow adult? I want to know how you or general society sees someone my age as because I feel like it\u2019s sort of a weird middle stage", "comment": "As somebody that cares how they're perceived.\n\n​\n\nI'm too old to care about it any more.", "upvote_ratio": 1270.0, "sub": "AskOldPeople"}208{"thread_id": "ui4kog", "question": "what did people do when they were depressed before SSRIs?", "comment": "Blamed themselves, denied, tried to suck it up, white knuckled life until it passed. If they were unable to function at all there were antidepressants, the side effect profile just made them very undesirable and a last resort.", "upvote_ratio": 1270.0, "sub": "AskOldPeople"}209{"thread_id": "ui4kog", "question": "what did people do when they were depressed before SSRIs?", "comment": "Tricyclic antidepressants were the first generation of drugs used to treat depression. They often worked and were a big step forward from ineffective non-drug treatments. But they had side effects including tiredness. weight gain, and the danger of overdose.", "upvote_ratio": 740.0, "sub": "AskOldPeople"}210{"thread_id": "ui4kog", "question": "what did people do when they were depressed before SSRIs?", "comment": "They suffered. Therapy wasn't even a thing most people would consider either (at least not in the Netherlands). That was for 'crazy' people, and I didn't feel crazy. In retrospect, I probably did have depression though. (Not anymore, thank goodness!)", "upvote_ratio": 560.0, "sub": "AskOldPeople"}211{"thread_id": "ui7nyj", "question": "With recent supreme court leaks there has been a large number of questions regarding the leak itself and also numerous questions on how the supreme court works, the structure of US government, and the politics surrounding the issues.  Because of this we have decided to bring back the US Politics Megathread.\n\n**Post all your US Poltics related questions as a top level reply** to this post.\n\n**All abortion questions and Roe v Wade stuff here as well.  Do not try to circumvent this or lawyer your way out of it.**\n\n**Top level comments are still subject to the normal NoStupidQuestions rules**:\n\n* We get a lot of repeats - **please search before you ask your question** *(Ctrl-F is your friend!)*. \n\n* **Be civil** to each other - which includes not discriminating against any group of people or using slurs of any kind. Topics like this can be very important to people, so let's not add fuel to the fire.\n\n* **Top level comments must be genuine questions**, not disguised rants or loaded questions. This isn't a sub for scoring points, it's about learning.\n\n* **Keep your questions tasteful and legal.** Reddit's minimum age is just *13!*", "comment": "If the supreme court overturns gay marriage is there any actions they can take to making gender affirming procedures and HRT illegal?", "upvote_ratio": 30.0, "sub": "NoStupidQuestions"}212{"thread_id": "ui7nyj", "question": "With recent supreme court leaks there has been a large number of questions regarding the leak itself and also numerous questions on how the supreme court works, the structure of US government, and the politics surrounding the issues.  Because of this we have decided to bring back the US Politics Megathread.\n\n**Post all your US Poltics related questions as a top level reply** to this post.\n\n**All abortion questions and Roe v Wade stuff here as well.  Do not try to circumvent this or lawyer your way out of it.**\n\n**Top level comments are still subject to the normal NoStupidQuestions rules**:\n\n* We get a lot of repeats - **please search before you ask your question** *(Ctrl-F is your friend!)*. \n\n* **Be civil** to each other - which includes not discriminating against any group of people or using slurs of any kind. Topics like this can be very important to people, so let's not add fuel to the fire.\n\n* **Top level comments must be genuine questions**, not disguised rants or loaded questions. This isn't a sub for scoring points, it's about learning.\n\n* **Keep your questions tasteful and legal.** Reddit's minimum age is just *13!*", "comment": "Can't Biden just pardon anyone who gets an abortion?", "upvote_ratio": 30.0, "sub": "NoStupidQuestions"}213{"thread_id": "uib0kf", "question": "im a high school drop out with no math experience and i know its a long road but i really want to learn compsci and i need help knowing what sort of math i should focus on and learn for this job, i hear calc 1,2 and 3 also discrete math but idk where to start and learn. any help is much appreciated thanks!", "comment": "Compsci is a broad field. Personally I like the architecture and I suggest you this youtube playlist about cpu architecture which can be useful to understand what computer language is. It can help you to get into compsci.\n\nHow computers work - Building Scott's CPU: https://www.youtube.com/playlist?list=PLnAxReCloSeTJc8ZGogzjtCtXl_eE6yzA", "upvote_ratio": 30.0, "sub": "AskComputerScience"}214{"thread_id": "uicq7b", "question": "I\u2019m currently 23 and can\u2019t even imagine myself or what I will be like when I\u2019m in my 70\u2019s/80\u2019s. I\u2019ve heard that at this point time starts really speeding up, and I\u2019m just wondering how true you guys think that is?\n\nEdit: thank you all for your replies. It\u2019s been very insightful", "comment": "Faster than you can imagine.", "upvote_ratio": 960.0, "sub": "AskOldPeople"}215{"thread_id": "uicq7b", "question": "I\u2019m currently 23 and can\u2019t even imagine myself or what I will be like when I\u2019m in my 70\u2019s/80\u2019s. I\u2019ve heard that at this point time starts really speeding up, and I\u2019m just wondering how true you guys think that is?\n\nEdit: thank you all for your replies. It\u2019s been very insightful", "comment": "This is what it felt like for me: I blinked my eyes at 23 and I was suddenly 67\n\nIt comes so fast it will blow your mind", "upvote_ratio": 460.0, "sub": "AskOldPeople"}216{"thread_id": "uicq7b", "question": "I\u2019m currently 23 and can\u2019t even imagine myself or what I will be like when I\u2019m in my 70\u2019s/80\u2019s. I\u2019ve heard that at this point time starts really speeding up, and I\u2019m just wondering how true you guys think that is?\n\nEdit: thank you all for your replies. It\u2019s been very insightful", "comment": "It's true up to a point due to the fact that it's a matter of perspective. At 10 a week is a pretty significant portion of your life. At 60 it is less so. \n\nDoes time speed up? Technically no. But any given portion of time becomes a smaller fraction of your life, so it can easily seem to be passing faster.", "upvote_ratio": 420.0, "sub": "AskOldPeople"}217{"thread_id": "uieq53", "question": "I have a bunch of questions asking me to find the Big-theta bounds for some recurrences (assume that adequate base cases exist for each).\n\nOne example is T(n) = T(n-1) + n\n\nWould the answer be Big-Theta(n) or am I missing something else?", "comment": "Nope. In this case, you can solve for T(n) as an explicit equation: if T(0) = 0, then T(n) is the sum of all integers from 0 to n inclusive, which means T(n) = n*(n+1)/2, which is \u0398(n^(2)).", "upvote_ratio": 50.0, "sub": "AskComputerScience"}218{"thread_id": "uij5os", "question": "Is it worth it to work through rough patches in a marriage if you\u2019re young? Do older people married many years have many issues they\u2019ve overcome?", "comment": "Been with my husband for 44 years, married for 39. We have had several occasions when I thought 'I'm done with this nonsense.'\n\nThe first time was what I call the second year slump. We'd been married for a little over a year, and he couldn't be bothered to buy me a birthday present, because he 'didn't know what to get'. I was just getting home from a long shift at my second job as he and his brother (who was visiting from out of town) were  leaving to go out for dinner, with no consideration if I'd like to go along or if maybe I didn't want to be ditched on a Friday night that happened to be my birthday.\n\nWe had a few long talks about that, and what came of it is his realization that I didn't care about material gifts, but just wanted a bit of attention and affection. (This was before we'd heard of the Love Languages.)\n\nThings went much smoother after that, but there were plenty of bumps in the road along the way. We grew apart after our first born completely exhausted us during her first year. (Not her fault of course, but we should have communicated better, and we did with our second.)\n\nLater on we needed the help of a marriage counsellor who helped us in many ways.\n\nI just asked him now, and he says we're pretty happy for an old couple, and any of his unhappiness isn't caused by me. Yay!\n\nSo, yeah, we're totally okay with working to overcome issues. \n\n\"How else are you going to become a long-time couple?\" Hubby, May 4, 2022.", "upvote_ratio": 2290.0, "sub": "AskOldPeople"}219{"thread_id": "uij5os", "question": "Is it worth it to work through rough patches in a marriage if you\u2019re young? Do older people married many years have many issues they\u2019ve overcome?", "comment": "It depends on the issues. \n\nFinances? My husband and I have very different attitudes, but after we implemented a \"yours, mine, and ours\" system, we were good. We each agreed on what was fair to contribute to shared expenses, and the rest went into our personal accounts to do with as we wished. We have never, ever had a financial quibble since we did this.\n\nKids? You can't have half a kid. You either want them or you don't. That's a deal-breaker.\n\nLifestyle compatibility is important. If one of you thinks resorts and cruises are the best way to vacation and the other wants to hike the Appalachian Trail and wouldn't be caught dead on a cruise ship, you'll have some negotiating to do.\n\nFood? If you like gourmet cuisine and married a Hot Pockets type of person, you each make your own food. Easy-peasy. \n\nIn-laws? Our policy has always been that weddings and funerals are not optional. For everything else, it's, \"I'll just say you have a cold.\" \n\nNight owl vs morning lark? To each their own. It's infantilizing to tell another grownup when to wake up or go to bed. If it's causing sleep disruption, separate beds or bedrooms are fine. Don't believe the hype that you have to sleep in the same bed OR ELSE. My husband developed restless leg syndrome in the late 90s and sleeping in separate beds didn't break up our marriage. It improved it because we weren't awake and arguing all night.\n\nBut if you feel disrespected or if you are being put down, abused or stolen from, these are things you can't work your way back from without a real change on the part of the other person, backed up by therapy (theirs). \n\nHowever, never pick a fight over something dumb and petty like the color of the kitchen towels because when it's something important, you don't want your partner thinking, \"There they go again!\" I only just last week found out my husband hates the rug I bought a few years ago. He let it go, just like I let his Rush bobble head dolls become living room decor. \n\nSometimes you just have to say, \"Whatever.\"\n\nYeah, I'm GenX. Age 55 and retired.", "upvote_ratio": 2020.0, "sub": "AskOldPeople"}220{"thread_id": "uij5os", "question": "Is it worth it to work through rough patches in a marriage if you\u2019re young? Do older people married many years have many issues they\u2019ve overcome?", "comment": "Absolutely x 2! I was married to my first husband for 23 years when he passed away.  I've always said making a marriage work is harder than raising children. If you love each other, however, then you SHOULD fight for it. We overcame a lot of crap. I'm now remarried and we both agree that our marriage (2nd for each of us, both lost spouse due to death) is much easier this time around. We've learned from the mistakes in our past marriages. We've grown up and are much more easy going now. It was a surprise to us both! We are greatly enjoying this new phase in our lives, especially after so much tragedy beforehand.", "upvote_ratio": 970.0, "sub": "AskOldPeople"}221{"thread_id": "uim5fv", "question": "If you are old enough to have witnessed the many tragedies that occurred pre Roe v Wade, can you educate folks on what it was like?", "comment": "My grandmother had 15 children and I am pretty sure she didn't want more after the first 5.  But she had no choice because women could not obtain birth control without the consent of her husband, and were required *by law* to submit to intercourse.  As far as the law was concerned, a husband could not rape his wife since he had the legal *right* to have sex.\n\nThose first 5 children raised the next set of 5.  There was never enough of *anything*.  Not enough food, not enough space, not enough decent clothing, and medical and dental care was nonexistent.\n\nThe oldest of the 15 was My Aunt Fran.  She was essentially a house servant/slave who raised her siblings her entire childhood, getting very little education.  She escaped her childhood home by marrying the first man who looked at her.\n\nShe had 5 children in 7 years.  Her 6th child, Sally, came late in life and was born profoundly disabled.  Fran told me years later that she *knew* there was something amiss with that pregnancy and sadly told me if she'd known how to obtain an illegal abortion, she would have done so.  Fran parentified her own children, and Sally's older girl siblings were charged with feeding, changing, exercising, and monitoring Sally.  They also escaped their home by marrying young.\n\nLack of choice in childbearing curtailed so many lives in so many ways.  It's not limited to the gruesome stories of botched procedures or the sexual abuse of women seeking terminations.  \n\nIt's how having no reproductive freedom condemned so many women to narrow limited lives sacrificed to more children than they wanted or could provide for.  So much human potential was never realized.", "upvote_ratio": 3230.0, "sub": "AskOldPeople"}222{"thread_id": "uim5fv", "question": "If you are old enough to have witnessed the many tragedies that occurred pre Roe v Wade, can you educate folks on what it was like?", "comment": "My aunt had a miscarriage. The fetus didn't expel from her uterus, though. My aunt was dying, and the hospital -- St. Somebody-or-Other -- refused to do an abortion. My uncle checked her out of the hospital Against Medical Advice, and took her to a doctor he knew. The doctor performed a D&C (dilation and curettage) and saved her life.  \n\n\nMy cousin was raped when she was a young teen, about 14-15, I think. She didn't dare tell her parents about that or the pregnancy. She and her friends went to a woman who performed an \"abortion,\" and then ran when she started bleeding profusely. Her friends put her in a car and drove her to the emergency room. She didn't die, but she couldn't have children. And of course, her parents found out anyway and threw her out of the house. She lived with my grandmother after that. She was also very wild and eventually died from cirrhosis.   \n\n\nMy mom had my two brothers just ten months apart, and she got pregnant again while the youngest was still a baby. The doctor understood that her life was at stake, and that she had three children to take care of already. He made up some bullshit and got her a D&C. She lived to take care of us. If she'd carried that pregnancy to term, she would have died and the worst part is that our family priest told her she had to carry it to term; that was God's will. The tragedy is that my mother lost her faith then. She left the church because she didn't have the nerve to face Father What's-His-Name when he knew she had been pregnant and wasn't pregnant anymore. She couldn't face his judgment.  \n\n\nBecause of her, my own story didn't end in tragedy. When I was impregnated by an abusive man who immediately became my ex after this incident, she encouraged me to get an abortion so I wouldn't be tied to a jerk my whole life. She was half a continent away at the time, but she called me the night before, the morning of, and the evening after to make sure I was okay. She told me I was doing the right thing, that the real shame would be in bearing a child I didn't want and raising it with someone I didn't love. She was right, and years later, I raised two kids I desperately wanted with someone I loved. I got a happy-ever-after because the women who came before me suffered unimaginable tragedy.   \n\n\nThat's just my family. My friends would be a whole 'nother post.", "upvote_ratio": 2180.0, "sub": "AskOldPeople"}223{"thread_id": "uim5fv", "question": "If you are old enough to have witnessed the many tragedies that occurred pre Roe v Wade, can you educate folks on what it was like?", "comment": "Drug overdoses, poisonings, suicide, bleed to death, coat hangers and other crude objects,   an assortment of home remedies including poisons leading to organ failure, abandonment and disowning of pregnant girl by family, pregnancy in poverty, drug addicted and malnourished babies, pregnant girls removed fr school and sent to a \u201chome\u201d then baby taken away. Unwanted children abused and neglected in home or in government care. Adults stuck in a cycle of poverty. Moral and $ costs to society.", "upvote_ratio": 1590.0, "sub": "AskOldPeople"}224{"thread_id": "uiwpen", "question": "Hi,\n\nJust wondering if in the Rust community there is a preference/most idiomatic way to assign a string out of these three? \n\n    let s1:String = String::from(\"Rust\");\n    let s2:String = \"Rust\".to_owned();\n    let s3:String = \"Rust\".to_string();\n\nThanks in advance!", "comment": "[here](https://stackoverflow.com/questions/37149831/what-is-the-difference-between-these-3-ways-of-declaring-a-string-in-rust) you go", "upvote_ratio": 130.0, "sub": "LearnRust"}225{"thread_id": "uizhbx", "question": "I\u2019m still young, but this has been eating up my mind lately.\nIn other subreddits, it\u2019s always a concern of money and I\u2019ve looked at how much care costs for in-home, independent living, assisted living, etc. As you age, how have you gone about planning for this and how did you plan for your parents?", "comment": "I'll bet I'm not the only person here whose response would be that as an \"old person\" I already lost both parents a long time ago.    \ud83d\ude1e", "upvote_ratio": 180.0, "sub": "AskOldPeople"}226{"thread_id": "uizhbx", "question": "I\u2019m still young, but this has been eating up my mind lately.\nIn other subreddits, it\u2019s always a concern of money and I\u2019ve looked at how much care costs for in-home, independent living, assisted living, etc. As you age, how have you gone about planning for this and how did you plan for your parents?", "comment": "I got lucky. My father was as frugal as his parents had been, so when my stepmother needed assisted living, the money was there. I sure as hell didn't have it. He had no choice but to admit her because he was old and didn't have the strength or medical training to provide the level of care she needed. People who say they would never put a loved one into a care facility don't know wtf they're talking about. \n\nMy father has sufficient assets to cover his own long-term care as well, but it's not likely he'll need it. Drawn-out illnesses aren't how people in his line go down. They just drop dead after lunch on some random afternoon. And tbh, I'd rather get a call that my dad is gone than that he's now in the hospital with a tube down his throat and months or even years of suffering ahead of him.", "upvote_ratio": 110.0, "sub": "AskOldPeople"}227{"thread_id": "uizhbx", "question": "I\u2019m still young, but this has been eating up my mind lately.\nIn other subreddits, it\u2019s always a concern of money and I\u2019ve looked at how much care costs for in-home, independent living, assisted living, etc. As you age, how have you gone about planning for this and how did you plan for your parents?", "comment": "I'm very lucky.  My Mom put herself in a nice continuing care facility back in 1998.  She's still there and going strong today, at almost 97.  She said she didn't want to be a burden to her children.\n\nThree of us are nearby, so we get to see her regularly.  She is the model I want to follow. While I can't afford a place as nice as she's in, I don't want to be one of those stubborn old coots who refuses to leave their decaying house.", "upvote_ratio": 110.0, "sub": "AskOldPeople"}228{"thread_id": "uizmx2", "question": "I'm trying to create and run an extremely intensive C++ aerodynamics simulator and suspect I would need a cluster to run it effectively. What would be the most cost-effective way to do so?", "comment": "Universities often have clusters you can get access to... Probably for a fee for non-students. Just learn the tooling for that platform and code your simulation to target it.", "upvote_ratio": 90.0, "sub": "AskComputerScience"}229{"thread_id": "uizmx2", "question": "I'm trying to create and run an extremely intensive C++ aerodynamics simulator and suspect I would need a cluster to run it effectively. What would be the most cost-effective way to do so?", "comment": "Design your code to run on multiple GPUs and build a machine with as many GPUs as possible. Most motherboards support two GPUs, but there are a few that support four. If single-precision floating point computations are sufficient, use those because consumer-level GPUs are slow with double-precision floats. For more compute power, build multiple machines like that, connect them via ethernet and use sockets or MPI to transfer data. If the network throughput becomes a limiting factor, upgrade from ethernet to Infiniband.", "upvote_ratio": 60.0, "sub": "AskComputerScience"}230{"thread_id": "uizmx2", "question": "I'm trying to create and run an extremely intensive C++ aerodynamics simulator and suspect I would need a cluster to run it effectively. What would be the most cost-effective way to do so?", "comment": "Use a cloud computing provider. You can rent lots of CPUs, GPUs, and specialized processors like TPU for quite a reasonable price.\n\nDesigning your algorithm to efficiently split across many computers is not a simple problem. **However** - many people have solved this problem, and now there are many common libraries you can use which will do a lot of the hard work.\n\nIf you can split your problem into parts that don't interact (e.g. run lots of separate simulations), then you can use relatively basic libraries like Apache Beam ([https://cloud.google.com/architecture/running-external-binaries-beam-grid-computing](https://cloud.google.com/architecture/running-external-binaries-beam-grid-computing)).\n\nIf your problem doesn't split that way (e.g. if the different sub-parts of the problem interact), then you need more complicated methods, which are probably too complicated to get into in a reddit response.\n\n**Also** - the fastest approaches to this kind of problem are likely to use hardware accelerators like GPU and TPU. For GPU, you can write code yourself using CUDA to do things, although you can probably get nearly identical performance by building on top of existing libraries that implement the functionality you want. This is a pretty good reason to use something like NumPy/CuPy or Tensorflow (I know you said C++, but it might be worth it to use another language). You'd build your algorithm out of the relatively high-level operations provided by these frameworks (things like matrix operations, etc). These operations will have built in support for optimized hardware. If you're using c++, I highly recommend using Eigen as much as possible, as it has very optimized matrix operations.", "upvote_ratio": 40.0, "sub": "AskComputerScience"}231{"thread_id": "uj07ca", "question": "Most of Europe was bombed out by May 1945. But the U. S. wasn't and the Marshall plan helped Europe get back on it's feet. \n\nBut Where did that money come from? How was the war profitable? I know they sold war bonds, but how did people suddenly have money to borrow to the state?", "comment": "Well it mostly can be explained by[ this graph](https://cdn.theatlantic.com/assets/media/img/3rdparty/2012/11/debt-and-gdp-main6.png) The highest level of national debt as a proportion of GDP in the history of the US. \n\nThere was also some repayment of loans from the Lend/Lease act and reparations from Germany and Japan, but that's the gist of it.", "upvote_ratio": 80.0, "sub": "AskOldPeople"}232{"thread_id": "uj3tl6", "question": "For example, char in C++ is defined as being 8 bits in size. However, depending on the computer architecture, a memory address can hold anywhere from 8-64 bits. So, where exactly is such a variable stored within an address? Similarly, how would a variable whose size is greater than what\u2019s available in a memory address be stored?", "comment": "Every modern computer architecture that I'm aware of uses byte-addressable memory. \n\nOr to put it another way, in C++ a byte is *defined* as the smallest addressable unit of memory, and a char is defined as being 1 byte in size. (This allows you to use `char*` to manipulate regions of memory that might actually contain data of another type.) The C++ standard also guarantees that a byte will be *at least* 8 bits, and in practice it is virtually always *exactly* 8 bits.\n\nWhen you store a value that's larger than a single byte, it takes up multiple addresses. For instance, a 16-bit variable that is \"stored at address X\" really occupies the bytes at addresses X and X+1. If the variable is a numeric type, the ordering of the bytes is architecture dependent, but most architectures are little-endian (least significant byte first).", "upvote_ratio": 30.0, "sub": "AskComputerScience"}233{"thread_id": "uj4o98", "question": "Hello,\n\nI'm hoping this isn't a stupid question, if it turns out to be, I'll delete the post.\n\nI've recently started working a job where my boss stated that it'd be highly unlikely that I'd advance to management without a computer, electrical, or engineering degree. After researching the different type of degrees, I found Computer Science to be the one I would most like to pursue.\n\nI currently have a B.S. in Global Supply Chain Mgmt and when I've told friends that I want to pursue a Bachelor's in CS I keep getting asked the same thing: \"Why don't you just get a Graduates degree in CS?\" (This is coming from people who already have graduate degrees).\n\nI did well with my bachelors degree, I finished with a 3.96 gpa and consider myself a fairly intelligent and hard working person, but my computer skills are lacking. I'm proficient in common office programs like Excel, but I've never done any coding. I don't feel like I have a strong foundation and the thought of taking a Graduate degree in a subject I'm weak in is intimidating to me.\n\nSo firstly, is this even possible, to go from a B.S. MGMT degree to a Masters in CS? Secondly, if its possible, is this a good idea or should I start with an undergrad in CS?\n\nAm I just being given bad advice?\n\n​\n\nThank you\n\n​\n\nedit - grammar correction.", "comment": "I had an undergrad in history and am now doing a grad degree in CS.  I had to take several prerequisites before starting the actual grad program.  I have been interested in computers my whole life, taught myself programming years ago, and it was still a pretty tough leap to get started.  I think you should go for it if you really, truly want a CS degree, but if you're just doing it for a promotion at work and you're not that interested it's going to be a very, very difficult transition.", "upvote_ratio": 110.0, "sub": "AskComputerScience"}234{"thread_id": "uj4o98", "question": "Hello,\n\nI'm hoping this isn't a stupid question, if it turns out to be, I'll delete the post.\n\nI've recently started working a job where my boss stated that it'd be highly unlikely that I'd advance to management without a computer, electrical, or engineering degree. After researching the different type of degrees, I found Computer Science to be the one I would most like to pursue.\n\nI currently have a B.S. in Global Supply Chain Mgmt and when I've told friends that I want to pursue a Bachelor's in CS I keep getting asked the same thing: \"Why don't you just get a Graduates degree in CS?\" (This is coming from people who already have graduate degrees).\n\nI did well with my bachelors degree, I finished with a 3.96 gpa and consider myself a fairly intelligent and hard working person, but my computer skills are lacking. I'm proficient in common office programs like Excel, but I've never done any coding. I don't feel like I have a strong foundation and the thought of taking a Graduate degree in a subject I'm weak in is intimidating to me.\n\nSo firstly, is this even possible, to go from a B.S. MGMT degree to a Masters in CS? Secondly, if its possible, is this a good idea or should I start with an undergrad in CS?\n\nAm I just being given bad advice?\n\n​\n\nThank you\n\n​\n\nedit - grammar correction.", "comment": "Lots of people do second bachelor's degrees.  There's nothing wrong with it and you're entirely correct that it will likely provide a more gentle introduction to the topic.  If you're just looking to check the box with the lowest possible effort, Thomas Edison State University might be worth a look.\n\nThat being said, there's no question that a master's degree is a more valuable credential.  Plenty of people do a CS master's even though their undergraduate was something else, although typically people doing this already have some work experience writing code.  Georgia Tech's OMSCS is worth looking at.\n\nOne crucial question is whether you have any interest or aptitude for computer science and software development.  Perhaps you should take a good intro to CS course, like Harvard's CS50, and see how it goes before committing yourself to a larger program.", "upvote_ratio": 80.0, "sub": "AskComputerScience"}235{"thread_id": "uj4o98", "question": "Hello,\n\nI'm hoping this isn't a stupid question, if it turns out to be, I'll delete the post.\n\nI've recently started working a job where my boss stated that it'd be highly unlikely that I'd advance to management without a computer, electrical, or engineering degree. After researching the different type of degrees, I found Computer Science to be the one I would most like to pursue.\n\nI currently have a B.S. in Global Supply Chain Mgmt and when I've told friends that I want to pursue a Bachelor's in CS I keep getting asked the same thing: \"Why don't you just get a Graduates degree in CS?\" (This is coming from people who already have graduate degrees).\n\nI did well with my bachelors degree, I finished with a 3.96 gpa and consider myself a fairly intelligent and hard working person, but my computer skills are lacking. I'm proficient in common office programs like Excel, but I've never done any coding. I don't feel like I have a strong foundation and the thought of taking a Graduate degree in a subject I'm weak in is intimidating to me.\n\nSo firstly, is this even possible, to go from a B.S. MGMT degree to a Masters in CS? Secondly, if its possible, is this a good idea or should I start with an undergrad in CS?\n\nAm I just being given bad advice?\n\n​\n\nThank you\n\n​\n\nedit - grammar correction.", "comment": "[deleted]", "upvote_ratio": 60.0, "sub": "AskComputerScience"}236{"thread_id": "uj4vmu", "question": "Hobbies, activities please. Thank you.", "comment": "Volunteer.  Take part in an organization that contributes to the greater good.", "upvote_ratio": 1060.0, "sub": "AskOldPeople"}237{"thread_id": "uj4vmu", "question": "Hobbies, activities please. Thank you.", "comment": "Anything that helps others. The simplest way to start is probably volunteering to hold babies at the nearest day care or hospital. All you have to do is sit and rock, and it makes a huge difference. Another easy option is sitting with frightened dogs at the shelter, helping them learn to socialize.", "upvote_ratio": 420.0, "sub": "AskOldPeople"}238{"thread_id": "uj4vmu", "question": "Hobbies, activities please. Thank you.", "comment": "Ask their advice on a topic of interest to them. Chat about their hobbies. Gardening? I\u2019ve asked why my tomatoes had cracks in them.", "upvote_ratio": 260.0, "sub": "AskOldPeople"}239{"thread_id": "uj580c", "question": "What is your diet like?", "comment": "Mostly whiskey and chicken gristle. I eat a carrot every once in a while if I\u2019m double dared.", "upvote_ratio": 260.0, "sub": "AskOldPeople"}240{"thread_id": "uj580c", "question": "What is your diet like?", "comment": "Breakfast is 2 cups of black coffee. Afternoon I'll often have a pot of tea, maybe a tiny bit of milk, no sugar. Drink plenty of water as well.\n\nLunch is either 1) fresh whole fruit, 2) eggs and bacon, or 3) leftover veggies in scrambled eggs.\n\nDinner is either 1) a big salad with fat and protein added, or 2) roasted veggies with a serving of protein and maybe a bit of whole wheat bread.\n\nI eat about 6 to 8 cups of fresh veggies a day, along with one or two servings of animal protein. This is punctuated with small amounts of cheese, olives, nuts, or bread. Everything as high-quality as I can get it.\n\nI transformed my figure and my energy levels around the age of 40 (48yo now) by eliminating all forms of processed food from my diet. I will sometimes drink mineral water, but no soda. No fast food. No chips, candy bars, protein bars, or energy drinks. No canned or boxed processed food of any kind.\n\nFor special occasions, I'll eat something with a little sugar, like pie (has to be fresh-made, though). I always feel sluggish and tired the next day, so I plan accordingly.\n\nWhen I follow this simple routine, I have the energy of a 25-year-old. It's amazing how well it works. My digestive system hums, with no gas, bloating, or bowel issues. My skin looks great, my brain is clear.\n\nBefore I adopted this diet, I had brain fog a lot and was diagnosed with pre-diabetes and fatty liver disease. It's all gone now. I'm the same size I was at 20. I am low-carb but not full-on keto; I'll eat potatoes or corn sometimes with my veggies.\n\nPeople often think I'm a decade younger due to my energy levels and great skin.", "upvote_ratio": 130.0, "sub": "AskOldPeople"}241{"thread_id": "uj580c", "question": "What is your diet like?", "comment": "Lots of vegetables, fruit, nuts, some dairy, meat and the odd alcoholic beverage. I don't eat fast food anymore and basically cook everything myself. Mass produced convenience food isn't something I eat anymore.", "upvote_ratio": 130.0, "sub": "AskOldPeople"}242{"thread_id": "uja7z2", "question": "Computer engineers seem unanimous in regarding 2-valued logic as having a privileged position: privileged, not just in the sense of corresponding to the way we do speak, but in the sense of having no serious rival for logical reasons.\n\nIf the foregoing analysis is correct, this is a prejudice of the same kind as the famous prejudice in favor of a privileged status for Euclidean geometry (a prejudice that survives in the tendency to cite 'space has three dimensions' as some kind of 'necessary' truth).\n\nOne can go over from a 2-valued to a 3-valued logic without totally changing the meaning of 'true' and 'false'; and not just in silly ways, like the ones usually cited (e.g. equating truth with high probability, falsity with low probability, and middlehood with 'in between' probability).", "comment": "Sure. Some kinds of [ternary computers](https://en.wikipedia.org/wiki/Ternary_computer) have been tried in the past, at least in the Soviet Union.\n\nI don't know if they'd have practical advantages over binary, though. The logic circuitry would probably become more complex, and although it may sound like a three-state logic value would hold more information than a two-state one, non-binary values would also make it harder to e.g. physically distinguish between the voltages representing the different values.\n\nI'm not really an expert on the practical benefits and drawbacks of non-binary computing circuitry, though. Some potentially interesting links that might give more informed views:\n\nhttps://stackoverflow.com/questions/764439/why-binary-and-not-ternary-computing\n\nhttps://www.techopedia.com/why-not-ternary-computers/2/32427\n\nhttps://duckduckgo.com/?q=why+is+ternary+computing+not+common", "upvote_ratio": 100.0, "sub": "AskComputerScience"}243{"thread_id": "uja7z2", "question": "Computer engineers seem unanimous in regarding 2-valued logic as having a privileged position: privileged, not just in the sense of corresponding to the way we do speak, but in the sense of having no serious rival for logical reasons.\n\nIf the foregoing analysis is correct, this is a prejudice of the same kind as the famous prejudice in favor of a privileged status for Euclidean geometry (a prejudice that survives in the tendency to cite 'space has three dimensions' as some kind of 'necessary' truth).\n\nOne can go over from a 2-valued to a 3-valued logic without totally changing the meaning of 'true' and 'false'; and not just in silly ways, like the ones usually cited (e.g. equating truth with high probability, falsity with low probability, and middlehood with 'in between' probability).", "comment": "Binary logic doesn't actually have any particular advantage over other forms (it's less efficient actually). It's simply easier to construct a machine with only two states which makes scaling and error reduction very easy.", "upvote_ratio": 60.0, "sub": "AskComputerScience"}244{"thread_id": "uja7z2", "question": "Computer engineers seem unanimous in regarding 2-valued logic as having a privileged position: privileged, not just in the sense of corresponding to the way we do speak, but in the sense of having no serious rival for logical reasons.\n\nIf the foregoing analysis is correct, this is a prejudice of the same kind as the famous prejudice in favor of a privileged status for Euclidean geometry (a prejudice that survives in the tendency to cite 'space has three dimensions' as some kind of 'necessary' truth).\n\nOne can go over from a 2-valued to a 3-valued logic without totally changing the meaning of 'true' and 'false'; and not just in silly ways, like the ones usually cited (e.g. equating truth with high probability, falsity with low probability, and middlehood with 'in between' probability).", "comment": "At the electrical level it\u2019s a mess. You need to have a \u201cnoise margin\u201d between acceptable voltages, and a single trivalent wire now needs two noise margins in the voltage range. \n\nIt is used in Ethernet cables. It\u2019s more like you are allowing two steps rather than two voltages. \n\nThe concept also applies to binary division. You know how in long division you sometimes picked too big of a quotient and have to redo that digit slightly smaller.\n\nIn division hardware it\u2019s set up so that the each quotient bit can be {-1, 0, 1}.  That way, if you guess wrong you can make the next bit negative. (Electrically each one is really two wires, but the math is on the pair.)", "upvote_ratio": 30.0, "sub": "AskComputerScience"}245{"thread_id": "ujamta", "question": "I'm looking to build a Beowulf cluster, likely of many identical older PCs due to budget constraints. I'll be using CPUs for my easily parallelizable computations. Do you have a recommendation for a specific one to allow a cost-effective, powerful cluster (preferably with Infiniband support), or at least the list I am thinking of?", "comment": "There's no way running your own cluster is going to be more cost-effective than the alternatives.\n\n>I'll be using CPUs for my easily parallelizable computations.\n\nWhy not GPU?  \"Easily parallelizable computations\" is exactly what they are designed to do and are going to be cheaper than running second-hand enterprise boxes.  An AWS instance with 4 high-end GPUs is like $5/hr.\n\n>(preferably with Infiniband support)\n\nRunning your own enterprise-grade gear with Infiniband takes this out of the hobbyist domain and squarely into \"You better be making money on this\" area.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}246{"thread_id": "ujba2w", "question": "Have you ever had to scold your kids as adults and rightfully so?", "comment": "Once my children reached adulthood to me they were adults and i treated them as such. I will work to guide, but never scold.", "upvote_ratio": 250.0, "sub": "AskOldPeople"}247{"thread_id": "ujba2w", "question": "Have you ever had to scold your kids as adults and rightfully so?", "comment": "Yes, sometimes it\u2019s necessary. When you\u2019re in a committed relationship, you don\u2019t flirt with your exes. It\u2019s hurtful. Watch your drinking. Moral & legal are two different things. Stuff like that. My love is unconditional for them, but we aren\u2019t religious and I feel an obligation to be somewhat of a moral compass, even tho they\u2019re grown. I\u2019m their mother, that responsibility doesn\u2019t end til the day I die.", "upvote_ratio": 210.0, "sub": "AskOldPeople"}248{"thread_id": "ujba2w", "question": "Have you ever had to scold your kids as adults and rightfully so?", "comment": "No kids, but I did have to scold my own father.\n\nI was still working, he was retired, and it was the second year in a row that he hadn't gotten a cost of living increase on his Social Security. He was outraged. \n\nBear in mind that this is a man with two pensions, a nice inheritance, and (at the time) four paid-in-full properties. He has sold two of them since then. My stepmother was still alive at the time and working, and both of them had supplemental retirement accounts.\n\nI reminded my father that my husband and I hadn't had a cost of living increase in two years and we still had to work 40+ hours per week and pay a fucking mortgage each month on our ONE house, so he would need to look elsewhere for sympathy. I said it calmly and politely, and he never mentioned it again.", "upvote_ratio": 110.0, "sub": "AskOldPeople"}249{"thread_id": "ujehg9", "question": "Old people of Reddit who were in the Troubled Teen Industry, what was it like back then? Was it worse than today's Troubled Teen Industry or was it the same?", "comment": "Back in my day it was called 'joining the military'.  Many men that were convicted of misdemeanors or low level felonies were given the choice of jail or joining the armed forces.  Led to unspeakable crimes committed in Viet Nam by our own soldiers, and drug trafficking went through the roof.  Families with unruly teenagers would also advise, encourage or even coerce their sons into joining the military.", "upvote_ratio": 400.0, "sub": "AskOldPeople"}250{"thread_id": "ujehg9", "question": "Old people of Reddit who were in the Troubled Teen Industry, what was it like back then? Was it worse than today's Troubled Teen Industry or was it the same?", "comment": "What is a \"Troubled Teen Industry\"?", "upvote_ratio": 280.0, "sub": "AskOldPeople"}251{"thread_id": "ujehg9", "question": "Old people of Reddit who were in the Troubled Teen Industry, what was it like back then? Was it worse than today's Troubled Teen Industry or was it the same?", "comment": "Currently, much of the troubled teen industry appears to be privatized prisons. \n\nLike many of the organizations in the long past, it is far from perfect... or legitimate. Read the [wiki article](https://en.wikipedia.org/wiki/Kids_for_cash_scandal) about it. Pennsylvania judge was receiving kickbacks for every Juvenile he had incarcerated. Many first time offenders and minor offenders had their rights ignored as he kangaroo courted them to juvie centers that were paying him. The courts are still dealing with the aftermath,", "upvote_ratio": 140.0, "sub": "AskOldPeople"}252{"thread_id": "ujgi9w", "question": "So, from my understanding, the terms are often interchangeable, but not always. All computers have a video card (my guess is it's located on the motherboard?) but not all computers have a graphics card. Would it be correct to say that all graphics cards are video cards but not all video cards are graphics cards? And since all computers have a video card, does that mean that computers with a graphics card also have a video card? If so, how does work get divided between them? Can video cards and graphics cards work in tandem?", "comment": "Video cards and graphics card (Graphics Processing Unit or GPU) are the same thing. What you might be confused about is an integrated GPU and an external GPU. Integrated GPUs are small that are often on the same chip as the CPU (example: Intel series chips without the \"F\" suffix, like i5-12400K, or AMD chips with the \"G\" suffix, like 5600G). They are generally not very powerful and can be cooled with the same cooling solution as that of the CPU. They are more than sufficient for everyday tasks and general video streaming, 2D games, and some 3D games.\n\nExternal GPUs are, as the name implies, outside of the CPU, and are huge because of the giant heatsink and fans. These are the nvidias and the bigger amd cards, like the RTX 3080 or the 6900XT. These are much more powerful. Programs that require copius amounts of math based paralleling processing (AAA gaming, cryptomining, and many scientific simulations and calculations) can make very good use of these cards.", "upvote_ratio": 90.0, "sub": "AskComputerScience"}253{"thread_id": "ujgi9w", "question": "So, from my understanding, the terms are often interchangeable, but not always. All computers have a video card (my guess is it's located on the motherboard?) but not all computers have a graphics card. Would it be correct to say that all graphics cards are video cards but not all video cards are graphics cards? And since all computers have a video card, does that mean that computers with a graphics card also have a video card? If so, how does work get divided between them? Can video cards and graphics cards work in tandem?", "comment": "So, neither of those terms is really exact with an absolute meaning, but both practically mean the same thing. There are no distinct meanings.\n\nWhat *may*, in principle, mean two different things are video cards and GPUs, or graphics processing units. Understanding that distinction might be helped by a brief look into history.\n\nTraditionally, the word \"video card\" (or \"display card\", \"video adapter\", \"display adapter\", \"graphics card\", etc.) implies a device that can feed an image output onto a display device or monitor. Video cards up to the mid-90's were meant for that, and didn't do much *processing* or computation on the graphics. They may have had some primitive 2D graphics processing capabilities but their main purpose was to get the image generated by the computer's software onto the physical display, not so much to be involved in generating or manipulating the image in the first place.\n\nIn the late 90's, consumer-grade 3D graphics accelerators were introduced. They had actual computational capabilities for processing 3D graphics. Some of them were video cards with integrated 3D graphics processing capabilities. Others were plain \"3D accelerator\" cards that successfully provided capabilities for faster and better graphics processing, but the \"getting the image onto the monitor\" part had to be done by a separate traditional video card to which the accelerator card was connected.\n\nSeparate accelerator-only cards disappeared after a few years. All new graphics accelerators would begin to ship with traditional video adapter hardware built in, so the single card fulfilled both roles. Soon almost nobody would be selling plain old video cards without acceleration/processing capabilities either, and even the cheapest and the most primitive of PC video cards started having at least some kinds of 3D graphics processing capabilities as well. The distinction between a \"graphics accelerator\" and a traditional video card practically disappeared, at least on consumer PCs.\n\nGraphics accelerators with actual processing capabilities began to be commonly called \"GPUs\" or graphics processing units at the turn of the century when NVidia started using the term for their then-latest generation of graphics cards. The term had existed before but that's when it began to be commonly used to refer to PC hardware that sported extensive graphics processing capabilities. All consumer PC video cards were also graphics processors by this point, and all graphics processors were video cards, so the distinction was no longer practically important.\n\nSince today's GPUs are extensively programmable and can be used for many kinds of heavy data processing tasks in scientific computation etc., without necessarily needing video output, GPUs without a video output may make sense once again, so you might run into a GPU that's technically not a video card. And some industrial or other non-consumer devices might have no need for even the most primitive of graphics processing but do need to output an image, so I suppose you might be able to find plain old video adapters that aren't GPUs somewhere.\n\nBut in consumer PCs, phones etc., all video cards are practically GPUs and all GPUs are practically video cards, although the terms are conceptually different.", "upvote_ratio": 40.0, "sub": "AskComputerScience"}254{"thread_id": "uji4hi", "question": "I'm writing a wallpaper browser. It would fech images from wallhaven.cc via their api and display them in a row, and then the user would click on one and it would be downloaded and have another program applied to it. I can't figure out, how to fetch the image preview in the app itself. I have a prototype in electronJS, but there I just use the img src and call it a day. Is there a sensible way to do this in rust, or should I just stick with electron?", "comment": "Displaying heavily depends on what UI toolkit are you using.  \nBut to download the image you can use `reqwest` crate. And then probably convert it to raw bytes (from e. g. jpeg) using `image` crate.", "upvote_ratio": 90.0, "sub": "LearnRust"}255{"thread_id": "uji4hi", "question": "I'm writing a wallpaper browser. It would fech images from wallhaven.cc via their api and display them in a row, and then the user would click on one and it would be downloaded and have another program applied to it. I can't figure out, how to fetch the image preview in the app itself. I have a prototype in electronJS, but there I just use the img src and call it a day. Is there a sensible way to do this in rust, or should I just stick with electron?", "comment": "Well, how you get a preview depends on the API of whatever website you are using, and how you display it depends on the GUI framework that you are using. So not really a Rust question", "upvote_ratio": 30.0, "sub": "LearnRust"}256{"thread_id": "ujklqq", "question": "I hear so many different stories like ppl saying they didn\u2019t even know the f word existed till they got older. Edit btw can you guys mention what decade you grew up in and also I don\u2019t mean the curse words you heard in your household since nowadays it\u2019s also true parents might not curse around their kids but like at school and other environments I mean", "comment": "The main curse words we know today were all well known.  Anyone telling you they didn't know about the word fuck is fucking lying.", "upvote_ratio": 180.0, "sub": "AskOldPeople"}257{"thread_id": "ujklqq", "question": "I hear so many different stories like ppl saying they didn\u2019t even know the f word existed till they got older. Edit btw can you guys mention what decade you grew up in and also I don\u2019t mean the curse words you heard in your household since nowadays it\u2019s also true parents might not curse around their kids but like at school and other environments I mean", "comment": "The curse words are exactly the same. Some racial slurs and insulting names have changed or fallen out of favor.", "upvote_ratio": 90.0, "sub": "AskOldPeople"}258{"thread_id": "ujklqq", "question": "I hear so many different stories like ppl saying they didn\u2019t even know the f word existed till they got older. Edit btw can you guys mention what decade you grew up in and also I don\u2019t mean the curse words you heard in your household since nowadays it\u2019s also true parents might not curse around their kids but like at school and other environments I mean", "comment": "I had a shirt in 1978 that said \"Disco Sucks\" and remember how much shit I got for it, since at the time it was the social equivalent of \"Cunts for Jesus\"\n\nSwears have become WAY more common than they were and WAY less shocking. I'm a fan.", "upvote_ratio": 60.0, "sub": "AskOldPeople"}259{"thread_id": "ujl1nh", "question": "Does drinking lots of water prevent the negative side effects of a high sodium diet (eg. increased blood pressure) ?", "comment": "A high sodium diet is dangerous for some individuals *because* of the resulting excess fluid intake. As you intake fluid to quench your resulting thirst, you increase the volume of fluid within your circulatory system. This increases your blood pressure. \n\nYour kidneys respond by working harder to remove more of the fluid from your system. For a healthy individual, this is not really a problem. Your kidneys remove the excess water and salt from your body without issue. \n\nFor someone with kidney disease, their kidneys may not be able to compensate for this excess fluid load. This results in sustained hypertension, which in addition to a vast number of other issues, further damages the glomeruli (the filters of the kidney).\n\nEDIT: As a caveat, even some healthy individuals are sodium-sensitive and may have resulting hypertension from excess sodium intake.", "upvote_ratio": 34340.0, "sub": "AskScience"}260{"thread_id": "ujl1nh", "question": "Does drinking lots of water prevent the negative side effects of a high sodium diet (eg. increased blood pressure) ?", "comment": "[removed]", "upvote_ratio": 5920.0, "sub": "AskScience"}261{"thread_id": "ujl1nh", "question": "Does drinking lots of water prevent the negative side effects of a high sodium diet (eg. increased blood pressure) ?", "comment": "It takes a lot of salt to make even a small difference in blood pressure for most people. \n\nEg reducing sodium by 4.4g per day (abour 12g salt, more than daily allowance) only reduces systolic bp by 4mm Hg, and diastolic by 2mm.\nhttps://pubmed.ncbi.nlm.nih.gov/23558162/\n\nMaybe bigger effects in people with high BP.", "upvote_ratio": 5300.0, "sub": "AskScience"}262{"thread_id": "ujl3lb", "question": "bro, i need help quick, i accidentally uninstall the whole wifi driver until the windows can't detect the wifi, help me because This is my brother laptop, and he uses it for work, he will be angry if he finds out that I did all that", "comment": "You're looking for /r/techsupport", "upvote_ratio": 30.0, "sub": "AskComputerScience"}263{"thread_id": "ujo2vd", "question": "What was the analog process for converting photos to halftone before digital desktop publishing?", "comment": "**Really old version:** You took the photo into an enlarger of sorts (a machine with a photo light and a lens with photo-reactive material under it) and scale it up or down to the size you needed. Then used a screen (a piece of mylar with a dot pattern in it where the dots were clear and the rest was black) on top of the photo-sensitive material and then make a negative with that set up. Put it through the developer, etc, then cut out the negative and put it into whatever the page was by splicing it into place with tape, etc. If it was color, you would use 4 screens to get the separate colors (C, M, Y, K) into negative form for making plates later. That process required four different pieces of mylar, all registered with register marks (a crosshair) on all sides.\n\n**Sort of old version:** You put the photo into a scanner and it would scan the photo into a dot pattern, make a negative from that scan and repeat the last steps above.\n\nAt some point, the digital version of all of this took over every step, but it was still not possible in a desktop version for quite a while. Doing page creation and popping photos into place on a screen happened in the late 80s. Prior to that you would set up the page digitally with all the graphics and type, (or even older, do a paste-up with all the elements, tedious!) but you would leave a blank square for the photos (or tape in a Xerox and write \"Size/Position ONLY\" on it). \n\nI'm probably forgetting some of this process, it's been a while. I not only did graphic design for over 40 years, but also worked part time in a color separation house for a while between jobs. A lot of various industries were wiped out due to digital desktop systems. No more type houses, no more film houses, no more developing fluid companies, etc.", "upvote_ratio": 130.0, "sub": "AskOldPeople"}264{"thread_id": "ujoeqf", "question": "I have an 8 month old son and it\u2019s going by fast. I wanted to ask if you had a favorite era or age range with your children. I know some people LOVE the newborn era and some get along much better once the kids have grown. \n\nThank you in advance if you take the time to answer!", "comment": "\u201cEvery age\u201d is the wise answer, but here\u2019s the honest one: about 5 to 9 yo. No more tantrums, interesting observations, no cynicism, great senses of humor, less constant threat of self-injury, etc. I was able to start sharing my nerdery with my kid and bonding over it. It\u2019s just a great age. \n\nMy kid is a teen now and is still lovable and loved (and we\u2019re seeing Doctor Strange together tonight!), but it\u2019s not the same.", "upvote_ratio": 3270.0, "sub": "AskOldPeople"}265{"thread_id": "ujoeqf", "question": "I have an 8 month old son and it\u2019s going by fast. I wanted to ask if you had a favorite era or age range with your children. I know some people LOVE the newborn era and some get along much better once the kids have grown. \n\nThank you in advance if you take the time to answer!", "comment": "Not the answer you probably want to hear, but them as adults (35,37,39) because I\u2019m not responsible for raising them anymore, we have a lot more things in common to discuss like politics, raising their own kids, etc and #1 they all have college educations (which I paid for), good jobs and SOs with good jobs so no more child rearing expenses for me! Now I can use whatever extra money I have on spoiling my grandkids!", "upvote_ratio": 890.0, "sub": "AskOldPeople"}266{"thread_id": "ujoeqf", "question": "I have an 8 month old son and it\u2019s going by fast. I wanted to ask if you had a favorite era or age range with your children. I know some people LOVE the newborn era and some get along much better once the kids have grown. \n\nThank you in advance if you take the time to answer!", "comment": "[deleted]", "upvote_ratio": 860.0, "sub": "AskOldPeople"}267{"thread_id": "ujomal", "question": "How to become a better programmer/computer engineer?\n\nI know this question may sound simple (considering that I could ask Google directly).\n\nBut I would like to know/read some advice from real people and their experience, about what things I can do to become a better programmer and computer engineer (career I study).\n\nRegardless of being a woman in a field where there are very few women (at least at my university), it has cost me a little more than my peers to be able to immediately learn the programming logic and programming languages themselves and many times that discourages me even though I love my career.\n\nI would like to read them to see if they have any advice to be able to see what tricks I could use to improve my good programming practices, to learn faster and in a good way.\n\nThanks in advance ;)", "comment": "I think the simple answer that most people say is, program, just something small and program it, \nmake a little console app that maybe asks for some some info, age , store that in memory, then maybe to a file, either txt or JSON \nThen read from them files and sort the data \nKeep adding to your programs and you\u2019ll learn quick about thinking ahead but don\u2019t bite too much off at the start. \n\nYou can add more complex stuff like dependency injection, add some loggers and use something like serilog to get use to nuget packages. \n\nAll of these small things in one simple console app will teach you a lot of simple but helpful things that\u2019s good  to have done. \n\nA good way my teacher explained stuff to me was, you know what a tree is, you know what a tree does, but how do you say tree In Spanish, or German or Chinese, you can lean that, but first, you need to know what a tree is, \n\nSame with programming, understand what a for loop is, then you can learn the language of how to write with it.", "upvote_ratio": 80.0, "sub": "AskComputerScience"}268{"thread_id": "ujomal", "question": "How to become a better programmer/computer engineer?\n\nI know this question may sound simple (considering that I could ask Google directly).\n\nBut I would like to know/read some advice from real people and their experience, about what things I can do to become a better programmer and computer engineer (career I study).\n\nRegardless of being a woman in a field where there are very few women (at least at my university), it has cost me a little more than my peers to be able to immediately learn the programming logic and programming languages themselves and many times that discourages me even though I love my career.\n\nI would like to read them to see if they have any advice to be able to see what tricks I could use to improve my good programming practices, to learn faster and in a good way.\n\nThanks in advance ;)", "comment": "It's something that you learn by doing. There's no getting around that. Early on especially, it's quite likely to be a struggle; things that I can write in 15 minutes today took 8 hours of tearing out my hair when I started. Nothing was immediate. Everything was struggle and frustration. \n\nI wrote my first bits of code 22 years ago. And honestly, the only things that come immediately are the things that I've done in some form hundreds of times. For everything else, I've got to step back, carefully break down the problem, and start planning out the sketch of a solution, sometimes jumping between attacking it from the top (overall structure of the problem) and the bottom (building solutions for specific sub-problems).", "upvote_ratio": 70.0, "sub": "AskComputerScience"}269{"thread_id": "ujomal", "question": "How to become a better programmer/computer engineer?\n\nI know this question may sound simple (considering that I could ask Google directly).\n\nBut I would like to know/read some advice from real people and their experience, about what things I can do to become a better programmer and computer engineer (career I study).\n\nRegardless of being a woman in a field where there are very few women (at least at my university), it has cost me a little more than my peers to be able to immediately learn the programming logic and programming languages themselves and many times that discourages me even though I love my career.\n\nI would like to read them to see if they have any advice to be able to see what tricks I could use to improve my good programming practices, to learn faster and in a good way.\n\nThanks in advance ;)", "comment": "Most crafts are learned by doing them. Painters paint, singers sing, sculptors sculpt. Coders code. IOW, practice. Find problems, invent them if you have to, and then solve them. Study other people's code to learn how it works, modify it to do something different.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}270{"thread_id": "ujpuct", "question": "Old folks of Reddit what was it like during the USSR era?? Was it hard???", "comment": "The thing I remember most was when someone would defect and make their way to the US. The news would interview them and they\u2019d talk about how bad it was, poverty, bread lines, crime, no fuel, etc, \n\nMany of them commented on how they thought they were being tricked when they first got to the US. They\u2019d see new cars and happy people and fancy clothes, but the one that stands out was the one who went to a grocery store and thought it was a set-up. They couldn\u2019t believe we had all that food. And anyone could go buy it. And the store would put out more. The person went to a few stores to make sure they weren\u2019t being tricked.", "upvote_ratio": 210.0, "sub": "AskOldPeople"}271{"thread_id": "ujpuct", "question": "Old folks of Reddit what was it like during the USSR era?? Was it hard???", "comment": "Not me, but a good friend grew up in Moscow int he 70's and 80's. \n\nThe school system built up a cult of personality around Leonid Brezhnev. The USA was the great enemy and only Leonid Brezhnev could protect the USSR and all the children from an invasion from America. \n\nWhen Brezhnev unexpectedly died in 1982, my friend says all the school kids were terrified America would immediately invade, destroy the country and kill/ enslave everyone. \n\nOtherwise, my friend says life in the Soviet era was boring. There was not much to do.  Lucky Muscovites had dachas or country cottages to occupy their summers. Some had cars, most did not.  Kids could attend summer (Pioneer) camps. But otherwise one went to school, one went home to an apartment. Nobody was hungry but aside from some playing with friends outside or reading books there was little to do . \n\nMy friend's dad was one of the few Soviet citizens able to travel overseas for work. He'd bring back a few  Western consumer goods like Seiko watches which could be sold or traded in Moscow. \n\nThey went on a summer vacation to the Black Sea one summer. He remembers walking along a beach, in Ukraine, in the late 70's,  dad's hand in one hand and giant boiled cob of corn on a stick in the other hand. This corn-on-a - stick was a Soviet era treat for kids. \n\nMost people in Moscow lived in an apartment, but it was common for wealthier people to have a garage or workshop elsewhere in the city. Dads could get away from the family to the garage and tinker with projects, like repairing old furniture, old appliances or brew home made hooch. \n\nSelf reliance was a big thing. Everyone knew how to sew/repair clothes, do gardening, grow vegetables, and do household repairs, leather-working and other practical skills.  Few people hired people to do these things, they did it themselves.", "upvote_ratio": 90.0, "sub": "AskOldPeople"}272{"thread_id": "ujpuct", "question": "Old folks of Reddit what was it like during the USSR era?? Was it hard???", "comment": "In some ways it was scary. Knowing any minute it could all melt away in a giant flash of light and radiation. \n\nOTOH, there was a great comfort knowing who the good guys and bad guys were. In particular, society was so busy being united behind defeating them - most years there was barely even a culture war", "upvote_ratio": 80.0, "sub": "AskOldPeople"}273{"thread_id": "ujs34p", "question": "What is the craziest/interesting/unlikely event you have ever personally witnessed?", "comment": "Just as the Sun was setting in the West over the open ocean I saw a green flash on the horizon line. \n\nThe last section of the Sun's disc was disappearing and the yellow turned to a bright, almost neon green color for a fraction of a second.  Don't know how rare the optical phenomenon is to observe, but I never saw it again since.", "upvote_ratio": 230.0, "sub": "AskOldPeople"}274{"thread_id": "ujs34p", "question": "What is the craziest/interesting/unlikely event you have ever personally witnessed?", "comment": "Trump getting elected President of the United States in 2016", "upvote_ratio": 230.0, "sub": "AskOldPeople"}275{"thread_id": "ujs34p", "question": "What is the craziest/interesting/unlikely event you have ever personally witnessed?", "comment": "When I was eight or nine, I was with the neighborhood kids on the street. For reasons I can\u2019t recall, one of the kids Darrel B. got into a disagreement with Roy W., the oldest of the family that lived across from me and my brothers. Darrel B. Lived directly across from Roy\u2019s family. \n\nDarrel who was 14 or so at the time ended up crying and proceeded to run home. \n\nAfter a few minutes, Darrel B\u2019s dad came out and confronted Roy. Words where spoken and Darrel\u2019s Dad pulled a gun and shot Roy in the chest. Roy had just turned 18.\n\n30 minutes later, I\u2019m walking down the street comforting his little sister, who has just just lost her Brother.  This incident changed my perspective of my life in the United States.", "upvote_ratio": 200.0, "sub": "AskOldPeople"}276{"thread_id": "ujsz70", "question": "Many people use cloud storage nowadays. What would happen if the server your data is on breaks down? Do you lose the data or is there a backup? Is it possible for this to happen?", "comment": "Any reputable service (e.g. Dropbox, Google Drive, iCloud) has multiple copies of data such that any single server failure wouldn't matter.", "upvote_ratio": 230.0, "sub": "AskComputerScience"}277{"thread_id": "ujsz70", "question": "Many people use cloud storage nowadays. What would happen if the server your data is on breaks down? Do you lose the data or is there a backup? Is it possible for this to happen?", "comment": "Any reputable cloud storage provider will have backups, yes. Depending on the service you can even select how paranoid you want to be. Iron Mountain, for instance, will also create magnetic tape backups of the entire history of changes to the data you store. This is usually not for backup purposes but for companies that need to be able to comply with certain legal requests. They also offer services like a special facility built into a mine in case you're worried someone with an airforce might try to destroy your data.", "upvote_ratio": 70.0, "sub": "AskComputerScience"}278{"thread_id": "ujsz70", "question": "Many people use cloud storage nowadays. What would happen if the server your data is on breaks down? Do you lose the data or is there a backup? Is it possible for this to happen?", "comment": "me: worked on distributed file systems / cloud storage and map-reduce infrastructure.\n\nIt's very, very unlikely for you to lose your data stored in the cloud. Typically it is substantially less likely than losing it due to a problem on your computer such as hard disk corruption, disk crash, hardware failure, etc.\n\nWhy? Typically your data will be stored in at LEAST two places, and usually more. It will also typically be broken up into 'blocks', and those blocks will be spread across many different servers, each block being replicated to multiple servers. \n\nThere are background processes that make sure there is more than one copy of your data, and if the replication factor is e.g. 4, it will (eventually) detect if more replicas are needed, and copy one of the copies of that block to additional places to meet the replication factor. There's fancier schemes too (such as erasure coding), but it boils down to about the same thing.\n\nIn this world, in order to lose the cloud copy of your data, a bunch of different servers on different racks and possibly in different geographical locations would have to fail at about the same time. And even then, you would be talking about losing part of ONE file typically, not all of your files.\n\nCan it happen? Sure. I'm sure it's happened hundreds of times to hundreds of files over the last year. But given we're talking about billions or trillions of files, it's much more reliable than your local storage.\n\nOne last note / admission - it's entirely possible for your data to be temporarily inaccessible. For example, a power outage or a network outage isolates the machines in the datacenter for a while. But, it pretty much always comes back.", "upvote_ratio": 60.0, "sub": "AskComputerScience"}279{"thread_id": "ujtwto", "question": "Diseases like Ebola and Rabies are much more fatal in humans than in their host species. Are there any diseases that are relatively safe in humans, but are lethal in animals?", "comment": "Bluetongue is fairly hard to catch and has mild symptoms in humans, but is deadly for sheep. It is a very serious disease for African pastoralists that is vectored by tiny biting sand flies.\n\nAnimals that can carry a disease that harms other animals, but has little or no ill effects for itself is called a reservoir species.\n\nEdit: I feel I need to clarify my post here. Humans, by virtue of not being able to catch bluetongue easily, are not specifically a reservoir species for bluetongue. An example of reservoir species for bluetongue would be non-sheep ruminants like cattle; cows can catch bluetongue much more easily than people, but exhibit only mild or no symptoms. OP's question was specifically about diseases that are \"safe\" for humans, but dangerous for other animals, and not specifically about reservoir species, but I thought I would mention the concept since it is a good jumping off point for looking at other examples of the same phenomena.", "upvote_ratio": 5150.0, "sub": "AskScience"}280{"thread_id": "ujtwto", "question": "Diseases like Ebola and Rabies are much more fatal in humans than in their host species. Are there any diseases that are relatively safe in humans, but are lethal in animals?", "comment": "People probably think about disease, infections, and pathogens in ways that are too binary. It's not like you have zero viruses, then one gets on you and bam you're infected. An infection is really when a microbe starts causing problems for your body. And it's not like bacteria and virus are good or bad. They're just doing their thing. Most of the time your body is fine with it, but sometimes things get out of hand.\n\nYou can have \"beneficial\" bacteria helping you in one area of your body, but that same bacteria gets somewhere it it's not supposed to be and now it's an infection. So you don't even need to look at diseases in different species. The same bacteria can be beneficial AND also lethal in the same animal.\n\nYou body is a complex ecosystem and problems arise when the ecosystem becomes unbalanced. Check out I Contain Multitudes by Ed Yong: https://www.goodreads.com/book/show/27213168-i-contain-multitudes", "upvote_ratio": 1930.0, "sub": "AskScience"}281{"thread_id": "ujtwto", "question": "Diseases like Ebola and Rabies are much more fatal in humans than in their host species. Are there any diseases that are relatively safe in humans, but are lethal in animals?", "comment": "[removed]", "upvote_ratio": 1140.0, "sub": "AskScience"}282{"thread_id": "ujuqux", "question": "Am 67. What comes to mind is Leisure Seeker, Still Alice, and On Golden Pond.", "comment": "Grumpy Old Men", "upvote_ratio": 150.0, "sub": "AskOldPeople"}283{"thread_id": "ujuqux", "question": "Am 67. What comes to mind is Leisure Seeker, Still Alice, and On Golden Pond.", "comment": "\"Older people\" is one of those generalizations. We're all over the map.  I'll send you off to see \"Harold and Maude,\" if you haven't already, about a young person acting old, and an old person who's very young.  I've known a Maude or two, though not in that way. ;-)", "upvote_ratio": 130.0, "sub": "AskOldPeople"}284{"thread_id": "ujuqux", "question": "Am 67. What comes to mind is Leisure Seeker, Still Alice, and On Golden Pond.", "comment": "Older people are still individuals. I'm afraid this question is only going to yield answers that reinforce stereotypes.", "upvote_ratio": 80.0, "sub": "AskOldPeople"}285{"thread_id": "ujwvla", "question": "Noob question but why are deployment environments named like this?\n\nI mean what do they mean by \"production\"? Shouldn't it be something like \"global\" (it would make sense since the first one is \"local\")\n\nAnd what does the word \"staging\" mean?\n\nIt's a bit counterintuitive to remember each of these since the names (seemingly) don't make sense.\n\nP.S.: English isn't my first language so if the answers are obvious to someone, please keep in mind they aren't to me :)", "comment": "I kind of thought of it in terms of a theatre performance metaphor.\n\nProduction is the live site. It's the site the public visits. Like a theatre or music \"production\". It's the \"live show\" that everyone actually watches, so to speak.\n\nStaging is the final practice grounds. Where everything is finally rehearsed just before going live. This isn't the the actual production yet though, were just giving it a last trial before giving the live production. We're \"stage testing\" the performance. Seeing what it looks like in a nearly identical environment to the live production (just minus the audience, ideally).\n\n\nLocal doesn't fit the theatre metaphor that well, but it's just your local machine usually. If you want to wedge it into the metaphor, it's the place \nan individual actor/actress will learn their lines and practice their performance etc.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}286{"thread_id": "ujwvla", "question": "Noob question but why are deployment environments named like this?\n\nI mean what do they mean by \"production\"? Shouldn't it be something like \"global\" (it would make sense since the first one is \"local\")\n\nAnd what does the word \"staging\" mean?\n\nIt's a bit counterintuitive to remember each of these since the names (seemingly) don't make sense.\n\nP.S.: English isn't my first language so if the answers are obvious to someone, please keep in mind they aren't to me :)", "comment": "I don't know where the names actually originate, but I always assumed \"production\" was inspired by something like a factory. \"Putting something into production\" means you've finished testing your prototypes, and now you're firing up the assembly lines to make the final products that will actually be shipped to real customers.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}287{"thread_id": "uk2ahs", "question": "Similar to reddit, there's a constant stream of new user generated content going to my server, plus visits to the content when players share and play it. I'd like a fast way to show the most popular ones today, this week, this month, and this year. I'm not even sure what this category of algorithm is called. I've tried to google combinations of keywords like:\n\n* computer science\n* algorithm\n* top, best, sorted\n* weekly, monthly, yearly\n* rolling, rolling average\n\nBut I just get \"best computer science topics\" and \"best sorting algorithms\" and \"how to get the day of week from a date\".\n\nIt seems to me that some daily operation could combine stats into buckets of the past 7 days, the past 4 weeks, and the past 12 months, but I don't see the full picture yet.\n\nSome keywords, wiki pages, blog posts, examples, or tools would be great. Thoughts? Thanks!", "comment": "I'd describe this problem as a \"top-k query over a sliding window\". Maybe that search term will give you better results?\n\nThere are fancy algorithms to try to solve this problem incrementally and/or approximately, but unless you're talking about a huge amount of data, it probably makes sense to just periodically compute the top items with a simple database query, and cache the result. Querying over a longer time range will be slower, but it also won't need to be updated as frequently.", "upvote_ratio": 120.0, "sub": "AskComputerScience"}288{"thread_id": "uk2ahs", "question": "Similar to reddit, there's a constant stream of new user generated content going to my server, plus visits to the content when players share and play it. I'd like a fast way to show the most popular ones today, this week, this month, and this year. I'm not even sure what this category of algorithm is called. I've tried to google combinations of keywords like:\n\n* computer science\n* algorithm\n* top, best, sorted\n* weekly, monthly, yearly\n* rolling, rolling average\n\nBut I just get \"best computer science topics\" and \"best sorting algorithms\" and \"how to get the day of week from a date\".\n\nIt seems to me that some daily operation could combine stats into buckets of the past 7 days, the past 4 weeks, and the past 12 months, but I don't see the full picture yet.\n\nSome keywords, wiki pages, blog posts, examples, or tools would be great. Thoughts? Thanks!", "comment": "My intuition, having never written something like that before, is to go with a 'brute force' database implementation until you know you need something better.  Shove everything into an SQL database and do a `SELECT * WHERE DATE = whatever ORDER BY 'score' LIMIT 10;` esque query.  If/when you outgrow this, I'd go with separate day/week/month/year tables with an index on score (one that supports ordering) plus cronjobs that regularly drop old entries.\n\nMy other thought is I haven't used Redis much but I *think* you can make it work with sorted sets and TTL (time-to-live) values.\n\nAlso [this is not what you are asking but interesting and relevant](https://medium.com/jp-tech/how-are-popular-ranking-algorithms-such-as-reddit-and-hacker-news-working-724e639ed9f7).  I found that with a search of \"top posts rolling 24 hours algorithm -instagram\" which has other interesting results.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}289{"thread_id": "uk3p5u", "question": "So was learning the data types part of the Rust book and saw this -\n\nWhen you\u2019re compiling in release mode with the\n\n    --release\n\nflag, Rust does *not* include checks for integer overflow that cause panics. Instead, if overflow occurs, Rust performs *two\u2019s complement wrapping*. In short, values greater than the maximum value the type can hold \u201cwrap around\u201d to the minimum of the values the type can hold. In the case of a\n\n    u8\n\n, the value 256 becomes 0, the value 257 becomes 1, and so on. The program won\u2019t panic, but the variable will have a value that probably isn\u2019t what you were expecting it to have. Relying on integer overflow\u2019s wrapping behavior is considered an error.\n\n​\n\nMy question is why even perform this integer wrapping. The program will be getting a value that is unexpected and it will likely be more of a bug. Why not just perform the same thing that is in debug mode that is crash the program. ", "comment": "This is one of the few places where Rust chose a small speed increase over a fairly important safety issue. See [Issue #47739](https://github.com/rust-lang/rust/issues/47739) for a discussion. This 2016 [blog post](https://huonw.github.io/blog/2016/04/myths-and-legends-about-integer-overflow-in-rust/) on the topic is quite good.\n\nYou can enable overflow checks for release builds in your `Cargo.toml` via\n\n    [profile.release]\n    overflow-checks = true", "upvote_ratio": 230.0, "sub": "LearnRust"}290{"thread_id": "uk3p5u", "question": "So was learning the data types part of the Rust book and saw this -\n\nWhen you\u2019re compiling in release mode with the\n\n    --release\n\nflag, Rust does *not* include checks for integer overflow that cause panics. Instead, if overflow occurs, Rust performs *two\u2019s complement wrapping*. In short, values greater than the maximum value the type can hold \u201cwrap around\u201d to the minimum of the values the type can hold. In the case of a\n\n    u8\n\n, the value 256 becomes 0, the value 257 becomes 1, and so on. The program won\u2019t panic, but the variable will have a value that probably isn\u2019t what you were expecting it to have. Relying on integer overflow\u2019s wrapping behavior is considered an error.\n\n​\n\nMy question is why even perform this integer wrapping. The program will be getting a value that is unexpected and it will likely be more of a bug. Why not just perform the same thing that is in debug mode that is crash the program. ", "comment": "I think wraping is just faster. You don't need to do anything to wrap but to panic you need to check for overflow every time.", "upvote_ratio": 160.0, "sub": "LearnRust"}291{"thread_id": "uk3p5u", "question": "So was learning the data types part of the Rust book and saw this -\n\nWhen you\u2019re compiling in release mode with the\n\n    --release\n\nflag, Rust does *not* include checks for integer overflow that cause panics. Instead, if overflow occurs, Rust performs *two\u2019s complement wrapping*. In short, values greater than the maximum value the type can hold \u201cwrap around\u201d to the minimum of the values the type can hold. In the case of a\n\n    u8\n\n, the value 256 becomes 0, the value 257 becomes 1, and so on. The program won\u2019t panic, but the variable will have a value that probably isn\u2019t what you were expecting it to have. Relying on integer overflow\u2019s wrapping behavior is considered an error.\n\n​\n\nMy question is why even perform this integer wrapping. The program will be getting a value that is unexpected and it will likely be more of a bug. Why not just perform the same thing that is in debug mode that is crash the program. ", "comment": "ELI5. A computer uses a fixed size for it's number types. So every number is basically like a mileage indicator (odometer) in your car. Let's assume just for fun that your car has a milage indicator with four digits.\n\nIf your car shows 9997 miles and you add six miles your car will show 3 miles (0003).\n\nIn your computer it works exactly the same but in binary. Because of that the number of different states a number can have is always a power of 2, like 256. So if you have an u8 it overflows from 255 to 0, if you have an i8 you also have \"room\" for 256 different values but they are offset and will overflow from 127 to -128.\n\nSo in debug mode rust adds checks to every operation that can overflow to determine if it would overflow. Those checks are many CPU instructions long and cost time. In release mode rust doesn't check and just uses (in most cases) a single CPU instruction (let's ignore LLVM for now) and this unchecked simple CPU instructions works like a binary milage indicator in hardware and automatically overflows.\n\nUpdate: If you explicitly want to pay the runtime cost and make sure it doesn't overflow you could also use the \"checked_xxx\" operations like this one: https://doc.rust-lang.org/std/primitive.i32.html#method.checked_add", "upvote_ratio": 110.0, "sub": "LearnRust"}292{"thread_id": "uk481c", "question": "Hi everyone! \n\nSo just recently, I got into the habit of devouring research papers about Software Engineering. I read on IEEE or ResearchGate; specifically on the topic of SDLC, Code Smells, Documenting Code, Security, and the like.\n\nAfter some time, I feel like doing and writing my own research too. However, the recommendations of the papers I've read so far are beyond my current skills. I then thought to myself that it's maybe because the authors of those papers are PhD holders and I'm just a college student.\n\nNow, I tried searching for thesis studies authored by an undergrad. Sadly, I didn't found much.\n\nSo I just want to ask you guys if you know some sites where I can read undergrad thesis with rich recommendations for future researchers? Or maybe you have one from your undergrad years that you're willing to share. It would be really really helpful.\n\nThank you so much for reading! Any suggestion, opinion, and answer will be greatly appreciated.", "comment": "You can find theses created at my school. Perhaps that's of interest to you? \n\nhttps://findit.dtu.dk/en/catalog?availability%5B%5D=electronic&availability%5B%5D=printed&q=type%3Athesis&type=thesis_bachelor&utf8=%E2%9C%93", "upvote_ratio": 50.0, "sub": "AskComputerScience"}293{"thread_id": "uk481c", "question": "Hi everyone! \n\nSo just recently, I got into the habit of devouring research papers about Software Engineering. I read on IEEE or ResearchGate; specifically on the topic of SDLC, Code Smells, Documenting Code, Security, and the like.\n\nAfter some time, I feel like doing and writing my own research too. However, the recommendations of the papers I've read so far are beyond my current skills. I then thought to myself that it's maybe because the authors of those papers are PhD holders and I'm just a college student.\n\nNow, I tried searching for thesis studies authored by an undergrad. Sadly, I didn't found much.\n\nSo I just want to ask you guys if you know some sites where I can read undergrad thesis with rich recommendations for future researchers? Or maybe you have one from your undergrad years that you're willing to share. It would be really really helpful.\n\nThank you so much for reading! Any suggestion, opinion, and answer will be greatly appreciated.", "comment": "Usually, undergrads are doing research under their professors and it\u2019s rare to see a paper published by an undergrad as a first name, even rarer to see a paper published by an undergrad themself. \n\nBut really, the research process and writing doesn\u2019t change whether you\u2019re a PhD, undergrad, tenured professor or industry researcher. Your goal is to convey the problem you\u2019re studying and maybe propose a solution backed with thorough analysis. \n\nThe reason why you feel those paper are above your skill level is because the authors have spent tremendous amount of time working on that subject and have accrued great understanding of the domain in that time. \n\nMy advice is that undergrad papers aren\u2019t usually that great. Of course, there\u2019s always that rare exception. But it\u2019s best to learn and imitate the best. If you\u2019re really passionate about research and academia, perhaps talk to one of your professors and see if they need an undergrad in their research. You\u2019ll learn so much more than going solo", "upvote_ratio": 30.0, "sub": "AskComputerScience"}294{"thread_id": "uk481c", "question": "Hi everyone! \n\nSo just recently, I got into the habit of devouring research papers about Software Engineering. I read on IEEE or ResearchGate; specifically on the topic of SDLC, Code Smells, Documenting Code, Security, and the like.\n\nAfter some time, I feel like doing and writing my own research too. However, the recommendations of the papers I've read so far are beyond my current skills. I then thought to myself that it's maybe because the authors of those papers are PhD holders and I'm just a college student.\n\nNow, I tried searching for thesis studies authored by an undergrad. Sadly, I didn't found much.\n\nSo I just want to ask you guys if you know some sites where I can read undergrad thesis with rich recommendations for future researchers? Or maybe you have one from your undergrad years that you're willing to share. It would be really really helpful.\n\nThank you so much for reading! Any suggestion, opinion, and answer will be greatly appreciated.", "comment": "plural of thesis is theses.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}295{"thread_id": "uk4jnr", "question": "Boomer here. I was in my 20s in 1980s Southern California. I have zero memories of  adolescent boys sporting  bowl-over-the-head haircuts in the 1980s like many of the male leads in the TV show \u201cStranger Things\u201d. I do distinctly remember them exclusively on clueless middle-aged men, in what seemed to me to be some kind of Beatles carryover, but never on teenage boys. Was this may be a regional thing exclusive to the Midwest and/or East Coast? Or is my recollection wrong?", "comment": "I thought they were trying to look like Moe Howard.", "upvote_ratio": 30.0, "sub": "AskOldPeople"}296{"thread_id": "uk4jnr", "question": "Boomer here. I was in my 20s in 1980s Southern California. I have zero memories of  adolescent boys sporting  bowl-over-the-head haircuts in the 1980s like many of the male leads in the TV show \u201cStranger Things\u201d. I do distinctly remember them exclusively on clueless middle-aged men, in what seemed to me to be some kind of Beatles carryover, but never on teenage boys. Was this may be a regional thing exclusive to the Midwest and/or East Coast? Or is my recollection wrong?", "comment": "I was in elementary school in the 1980s in coastal Southern California and about half the boys in my class had that exact haircut.", "upvote_ratio": 30.0, "sub": "AskOldPeople"}297{"thread_id": "uk4jnr", "question": "Boomer here. I was in my 20s in 1980s Southern California. I have zero memories of  adolescent boys sporting  bowl-over-the-head haircuts in the 1980s like many of the male leads in the TV show \u201cStranger Things\u201d. I do distinctly remember them exclusively on clueless middle-aged men, in what seemed to me to be some kind of Beatles carryover, but never on teenage boys. Was this may be a regional thing exclusive to the Midwest and/or East Coast? Or is my recollection wrong?", "comment": "In my kindergarden pics (1974, Australia) I have what I call the [Nicholas Bradford](https://www.gettyimages.co.nz/photos/nicholas-bradford) haircut. \n\nIt was a popular look in the second half of the 1970s up to around 1981 - mainly for little boys. \n\n[Older guys had a similar cut](https://www.tvflashback.com.au/peter-mochrie-the-restless-years/) but usually more 'flicked'.\n\nAfter 1981 our haircuts were more influenced by [The Human League](https://www.officialcharts.com/artist/18435/human-league/).", "upvote_ratio": 30.0, "sub": "AskOldPeople"}298{"thread_id": "uk880b", "question": "Just saw a post here about which movies portrayed old people best; was wondering what people here thought of \u201cUp.\u201d It came out when I was a kid, so I\u2019m wondering in what ways watching it from an older perspective would be from a younger perspective.", "comment": "My husband passed away just after I turned 50, so those first few minutes were completely accurate. It happens just that fast. Suddenly, your happy-ever-after is gone, and you're facing your last twenty years all by yourself. The rest of the movie is the moral of the story -- you find something to live for, or you sit around and wait to die.", "upvote_ratio": 1520.0, "sub": "AskOldPeople"}299{"thread_id": "uk880b", "question": "Just saw a post here about which movies portrayed old people best; was wondering what people here thought of \u201cUp.\u201d It came out when I was a kid, so I\u2019m wondering in what ways watching it from an older perspective would be from a younger perspective.", "comment": "One of the best 10 minutes of any movie ever. I cried like a baby. After the first 10 minutes I was emotionally spent. Could have gone home and still felt it was one of the best movies I\u2019d seen.", "upvote_ratio": 1380.0, "sub": "AskOldPeople"}300{"thread_id": "uk880b", "question": "Just saw a post here about which movies portrayed old people best; was wondering what people here thought of \u201cUp.\u201d It came out when I was a kid, so I\u2019m wondering in what ways watching it from an older perspective would be from a younger perspective.", "comment": ">It came out when I was a kid, \n\nOkay, reading that I did a double take.  Somehow in my head, that would have been just a few years ago, not the thirteen years it actually was.  Fuck, I'm old.", "upvote_ratio": 700.0, "sub": "AskOldPeople"}301{"thread_id": "uk8gk1", "question": "So GPUs have VRAM. Is there something similar CPUs have? I know they have a cache, but anything more like proper RAM?\n\n​\n\nEDIT: I just want to say, I'm just a guy. I'm not a student studying computer science, I just was curious. I'm a layman and I thought this question would be okay here. Didn't expect to anger so many people, it was certainly not my intent. I don't know much about computers and I don't claim to. I understand people can get offended if you don't have some basic knowledge but I figure better to ask a stupid question than never know. Nothing on the internet I could find could answer my question, but I understand now that it was probably because the way my question was phrased and that RAM itself being the CPUs RAM would be something you would know naturally if you studied computers. Again, I'm not a computer person or student, and I thought this question was okay, I didn't mean to anger anyone.", "comment": "For the record I don't think you're wrong to ask this question. :)", "upvote_ratio": 250.0, "sub": "AskComputerScience"}302{"thread_id": "uk8gk1", "question": "So GPUs have VRAM. Is there something similar CPUs have? I know they have a cache, but anything more like proper RAM?\n\n​\n\nEDIT: I just want to say, I'm just a guy. I'm not a student studying computer science, I just was curious. I'm a layman and I thought this question would be okay here. Didn't expect to anger so many people, it was certainly not my intent. I don't know much about computers and I don't claim to. I understand people can get offended if you don't have some basic knowledge but I figure better to ask a stupid question than never know. Nothing on the internet I could find could answer my question, but I understand now that it was probably because the way my question was phrased and that RAM itself being the CPUs RAM would be something you would know naturally if you studied computers. Again, I'm not a computer person or student, and I thought this question was okay, I didn't mean to anger anyone.", "comment": "Not really. Computer memory is organized into hierarchies of speed and locality (distance from) to the processor pipelines. There are generally speaking 6-levels: Harddrive, RAM\\*, L3 cache, L2 cache, L1 cache, registers. Data moves through this chain as it is needed. GPU's can have more localized memory to speed things up due to the volume of data they work with, but this is more of GPU's emulating CPU's than the converse. \n\n​\n\n\\*RAM is technically a memory model that allows reading from a selected point, instead of reading all the memory sequentially until that point. Nowadays it refers to a smaller faster (usually amnesiac) memory chip than the harddrive, as pretty much all memory follows the RAM model, including  harddrives.", "upvote_ratio": 110.0, "sub": "AskComputerScience"}303{"thread_id": "uk8gk1", "question": "So GPUs have VRAM. Is there something similar CPUs have? I know they have a cache, but anything more like proper RAM?\n\n​\n\nEDIT: I just want to say, I'm just a guy. I'm not a student studying computer science, I just was curious. I'm a layman and I thought this question would be okay here. Didn't expect to anger so many people, it was certainly not my intent. I don't know much about computers and I don't claim to. I understand people can get offended if you don't have some basic knowledge but I figure better to ask a stupid question than never know. Nothing on the internet I could find could answer my question, but I understand now that it was probably because the way my question was phrased and that RAM itself being the CPUs RAM would be something you would know naturally if you studied computers. Again, I'm not a computer person or student, and I thought this question was okay, I didn't mean to anger anyone.", "comment": "The [main memory](https://en.wikipedia.org/wiki/Computer_data_storage#Primary_storage) of the computer, often just called RAM in computer specs, is the RAM the CPU uses. The CPU also has caches, as you said, and small but very fast internal memory slots called registers that can temporarily hold individual numbers or values that the CPU is operating on.\n\nSome people probably got tripped off by the question because, to most people, video RAM and caches would seem more specific and more advanced knowledge than the fact that the CPU uses the main memory.\n\nIt's not a wrong question to ask, just a bit weird and surprising to some people.", "upvote_ratio": 60.0, "sub": "AskComputerScience"}304{"thread_id": "ukb9s4", "question": "Finding Radius of Graph - is this a correct algorithm? Can someone help me analyse its runtime?", "comment": "You're calling `runBFS` many times, and often you will call it for a path that has a subpath you have already analyzed. So your runtime will be way too long.\n\nI suggest you run an all-pairs-shortest-path algorith.\n\nUnless I'm misunderstanding what you're computing.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}305{"thread_id": "ukc5ou", "question": "Edit: I understand that many antivirals affect the viral polymerase, but I\u2019m most interested in nucleoside analogs like molnupiravir\u2026 how do they affect only viral RNA and not host RNA?", "comment": "The drugs don\u2019t target RNA per se, but the enzymes that make the RNA. since the viral enzymes are different than human enzymes, it is possible to find drugs that inhibit viral RNA synthesis but don\u2019t inhibit RNA synthesis by our cells.", "upvote_ratio": 10280.0, "sub": "AskScience"}306{"thread_id": "ukc5ou", "question": "Edit: I understand that many antivirals affect the viral polymerase, but I\u2019m most interested in nucleoside analogs like molnupiravir\u2026 how do they affect only viral RNA and not host RNA?", "comment": "They don\u2019t target RNA. However they can target RNA dependent RNA polymerases though since humans don\u2019t have them. RNA viruses have to be able to copy RNA to RNA, something humans never do (we go DNA -> RNA only) or in the case of retroviruses reverse transcriptase (RNA -> DNA) which again humans dont do so targeting it doesn\u2019t affect your cells. \n\nThere are ways to target RNA sequences directly and they are used in research but not as antiviral treatments (at least for now).", "upvote_ratio": 870.0, "sub": "AskScience"}307{"thread_id": "ukc5ou", "question": "Edit: I understand that many antivirals affect the viral polymerase, but I\u2019m most interested in nucleoside analogs like molnupiravir\u2026 how do they affect only viral RNA and not host RNA?", "comment": "A common class of antivirals are nucleoside analogs, molecules that are very similar to the building blocks of RNA, but that screw up replication when they get incorporated into a new RNA strand, keeping the virus from being able to effectively reproduce or massively slowing it down.\n\nViruses rely on their own enzymes to replicate their genomes , different from the ones our cells use for replication and transcription. Because of this, we can look for nucleoside analogs that will \"trick\" viral enzymes from a specific virus into trying to incorporate them into new RNA, but that won't interfere with our own cellular functioning.", "upvote_ratio": 510.0, "sub": "AskScience"}308{"thread_id": "uke6bp", "question": "Is Western society the most physically comfortable and least mentally fulfilling it has ever been?", "comment": "Most physically comfortable, probably. A middle class American has luxuries Cleopatra couldn't have dreamed of.\n\nMental fulfillment is a trickier beast. If you want it, it's out there, affordable to all but the poorest. Want to learn Chinese? Want to study French literature? Want to learn physics or calculus? Do you want to make friends with people from all over the world? There has never been a better time for that.\n\nBut we suffer from overload, I think. People seem to do best when they can choose from a small array of options. Too many choices makes most people's brains shut down. Then they just heat up a Hot Pocket, turn on the TV and watch the latest superhero movie.", "upvote_ratio": 1880.0, "sub": "AskOldPeople"}309{"thread_id": "uke6bp", "question": "Is Western society the most physically comfortable and least mentally fulfilling it has ever been?", "comment": "*Physically comfortable?* \\- Very much is physically more comfortable. Example: Living conditions in the entire South of the United States have been revolutionized by air conditioning. Not everybody has it, of course, but for those who do - and in public spaces like schools - it makes all the difference.\n\nTrade allows us to eat fresh vegetables and fruit year-round. Labor-saving inventions really do save a lot labor that modern generations may not even know about, like boiling clothes over a fire in the back yard to get them clean.\n\nCars are safer by far than in the past - seat belts, safety glass, airbags, and the futuristic accouterments of new cars. They are, however, way less roomy and more like fitting into an early space capsule. \n\nTo the extent you \"believe in\" vaccines, you can be free from everything from chicken pox to shingles, and smallpox is literally gone (unless somebody breaks into a freezer somewhere).\n\n*Mentally fulfilling?* \\- There's much more access to information. I personally find this liberating, like having the world's libraries in your own house.\n\nEntertainment has reached a strange plateau, which makes it less stimulating. Note all the reboot movies, for example. That's stultifying.\n\nEducation - well, we all know what's going on with education in the U.S. I can't speak for other countries. I would put this in the less fulfilling column.\n\nStress - Yeah, there's a ton of stress right now, but there was in the past, too. No decade has been without its awfulness. So this is on the fence. We have terrorism now; there was domestic terrorism and a lot more of it around 1900; there was the Cold War, there were several real wars. The political scene now is wildly chaotic and filled with rancor like I've never seen before. To the extent that cooperation is fulfilling, we're worse off.\n\nPersonal happiness - That's hard to say. The pandemic has thrown a monkey wrench into everybody's lives, separated families, prevented travel and so on. But the basics are mostly still there. \n\nThe curious case of fraternal societies is puzzling and I'd say means less mental fulfillment. The Masons, Lions, Elks, Moose, Rotary, Sons of Hermann, Knights of Columbus, Woodmen of the World, and all the rest are slowly (no, rapidly) dying out. As are churches. Where are people getting their need for group social activity from? *Reddit?* Good lord, what does that say about us?", "upvote_ratio": 400.0, "sub": "AskOldPeople"}310{"thread_id": "uke6bp", "question": "Is Western society the most physically comfortable and least mentally fulfilling it has ever been?", "comment": "No, I don't feel like that at all. Physically comfortable yes. Mentally fulfilling too. \n\nHumans are very bad at absolutes, we just perceive relatives. And we're bad at seeing constants, we only see change.\n\nSo when things are going from bad to worse and back, we think it's good. If things are good and stay good, we think it's bad. And when things go up a lot and down a bit, we think it's very bad.\n\nIn my mother's time, it was exceptional for her to get a higher education. When she started working it was expected from her to stop when she got pregnant. People were forced into marriage, into jobs. There was illiteracy, lack of information, abuse. \n\nAll that is still there, but if you compare life now with life fifty years ago, it has improved a lot for the large majority of people. Especially mentally, if you take into account freedom of life choices, education, information.\n\nAnd yes, there are problems in the world and younger generations have real problems to deal with. Just as every younger generation before them. But I feel that saying things are worse than in the past is quite a stretch. At least in my country and with a middle class background.", "upvote_ratio": 260.0, "sub": "AskOldPeople"}311{"thread_id": "ukes5d", "question": "I know there are some examples of viruses jumping host kingdoms, but they seem relatively rare compared to how often they jump between host species. Of the examples we do have, many of them we don't have direct evidence for, the jump is inferred from evolutionary evidence because it happened too far in the past. Is the jump between kingdoms 'harder', and if so, why?", "comment": "Hierarchy of life taxa is:\n\nDomain > kingdom > phylum > class > order > family > genus > species\n\nSpecies that share a common genus (ex. Wolf vs coyote) are much, much more similar than two species that only share a common kingdom (ex. Wolf vs lobster).\n\nSimilarity (or difference) of physiological niche, likelihood of encounter, cellular microenvironment, and presence of similar host cellular receptors roughly correlate with taxonomy.", "upvote_ratio": 60.0, "sub": "AskScience"}312{"thread_id": "ukey9p", "question": "Correct any assumptions I may have made, but I have read about how allergies can come from repeated exposures to something. For example, I've read the story about how cockroach researchers eventually become allergic to them, and in turn have an allergy to instant coffee.\n\n\n\nHow come we aren't allergic to things we experience everyday in our lives? I eat wheat almost everyday, will I eventually get to the point where I die if I walk past a bakery? Will all pet owners become allergic to their pets? Will youngsters all develop an allergy to AXE bodyspray? Will someone eventually become allergic to a medication that they take chronically?", "comment": "Allergies are due to your immune system misidentifying one protein as a similar protein.  So repeat exposure increases the risk of this part happening.  Once this happens, your body creates antibodies that will flag those proteins for histamine attack the next time they\u2019re seen.\n\nUsually our immune systems are good at proper identification, but some genetic traits as well as look a like proteins make certain allergies more likely.", "upvote_ratio": 1570.0, "sub": "AskScience"}313{"thread_id": "ukey9p", "question": "Correct any assumptions I may have made, but I have read about how allergies can come from repeated exposures to something. For example, I've read the story about how cockroach researchers eventually become allergic to them, and in turn have an allergy to instant coffee.\n\n\n\nHow come we aren't allergic to things we experience everyday in our lives? I eat wheat almost everyday, will I eventually get to the point where I die if I walk past a bakery? Will all pet owners become allergic to their pets? Will youngsters all develop an allergy to AXE bodyspray? Will someone eventually become allergic to a medication that they take chronically?", "comment": "While it is true that repeated exposure can cause allergies, it is also true that repeated exposures can cause immune tolerance. It depends on the context of the exposure. That is why vaccines contain an adjuvant. An adjuvant is a substance that stimulates an immune response. Because of the ensuing immune response against the adjuvant, anything mixed in with the adjuvant also get mixed into the immune response.\n\nIf a \"clean\" protein is given without adjuvant, it often fails to illicit an immune response. This is something called the \"immunologist's dirty little secret.\"\n\nIn other words, context and dose matter. Large doses of a \"clean\" protein can be used to induce tolerance or anergy which is the theory behind \"allergy shots.\"", "upvote_ratio": 1190.0, "sub": "AskScience"}314{"thread_id": "ukey9p", "question": "Correct any assumptions I may have made, but I have read about how allergies can come from repeated exposures to something. For example, I've read the story about how cockroach researchers eventually become allergic to them, and in turn have an allergy to instant coffee.\n\n\n\nHow come we aren't allergic to things we experience everyday in our lives? I eat wheat almost everyday, will I eventually get to the point where I die if I walk past a bakery? Will all pet owners become allergic to their pets? Will youngsters all develop an allergy to AXE bodyspray? Will someone eventually become allergic to a medication that they take chronically?", "comment": "Allergies come from your immune system mistaking something harmless for another thing that is actually bad, and attacking it scorched-earth style with the rest of you as collateral damage.\n\nThere's a few ways this can happen. You can have a genetic abnormality that causes your immune system to make the mistake the first time it sees something that should be harmless, and keep making that mistake forever.\n\nOr, your immune system can be just fine with that thing for awhile, but then it makes a mistake when it encounters that thing again years later and starts identifying it as the bad thing instead.\n\nAnd to make matters more complicated, sometimes your body can mistake something as bad, but through encountering it enough times and realizing it didn't actually kill you, learn that it made a mistake and stop doing it.\n\nThere's a reason that immunologists need so many years of school and get paid so much. Stuff's complicated.", "upvote_ratio": 330.0, "sub": "AskScience"}315{"thread_id": "ukg99v", "question": "How prevalent were harder drugs (Cocaine, heroin etc.) back in your day?", "comment": "Had my first taste of coke in \u201872 and loved it and by \u201874 I was buying ozs of it, @$2K per, from a NJ State cop who stole it from the evidence locker and it was awesome stuff but by \u201875 I realized I had a massive coke problem and stopped using it for good. Heroin was everywhere then too, but luckily I never used it.", "upvote_ratio": 190.0, "sub": "AskOldPeople"}316{"thread_id": "ukg99v", "question": "How prevalent were harder drugs (Cocaine, heroin etc.) back in your day?", "comment": "If you worked in the restaurant business in the '80s, you could count on some of your coworkers being dealers. Usually it was just to pay for their own stuff, which was kind of reassuring since it meant they had already tried out any batch they were selling.\n\nThe coke-addict restaurant manager who screamed at the staff wasn't just a trope, it was truth. I worked at one place where the manager liked to do lines on the framed liquor license with his buddies after closing. I would find the license lying on the bar in the morning with residue still on it.\n\nIt wouldn't surprise me if restaurants are still that way today.", "upvote_ratio": 150.0, "sub": "AskOldPeople"}317{"thread_id": "ukg99v", "question": "How prevalent were harder drugs (Cocaine, heroin etc.) back in your day?", "comment": "Coke was very common in the 80s. This was before people understood how addictive it was. I did it for a little while when it was around, but then swore off of it. Someone was always coming up to you with a little spoon in their hand. Personally, I hated it. It turned people into assholes pretty quickly. \n\nHeroin was not nearly as common. I don't personally know anyone that used it.", "upvote_ratio": 100.0, "sub": "AskOldPeople"}318{"thread_id": "ukgudl", "question": "Evushield: how does it work and why isn't it called a vaccine?", "comment": "Evushield is a combination of two different antibodies against the virus that causes COVID-19.  These antibodies stem from people who were recovering from COVID - that is, they were infected and their immune systems produced these antibodies.  These antibodies, once identified, are replicated as \u201cmonoclonal antibodies\u201d.  (Vastly simplified, white blood cells that produce the specific antibody are cloned and used to produce lots of the specific antibody which can then be purified and given to people.)\n\nOnce administered to someone, these antibodies behave as though the patient\u2019s own immune system produced them, and provide a defense against the infection.\n\nVaccines are quite different - they are not antibodies, but are a means of convincing the patient\u2019s immune system that an infection has occurred, so that the immune system will produce antibodies.\n\nPatients with compromised immune systems often cannot generate enough of their own antibodies and so vaccines are much less effective for them \u2014 but giving them actual antibodies can work well for a certain timespan.", "upvote_ratio": 220.0, "sub": "AskScience"}319{"thread_id": "ukgudl", "question": "Evushield: how does it work and why isn't it called a vaccine?", "comment": "Evusheld is a pair of long-acting monoclonal antibodies (meaning roughly, antibodies mass produced by a line of cloned cells in a lab). Monoclonal antibodies can be sourced from various types of cells; these two are produced in clones of human cells donated by people who had previously had COVID-19. Therefore they are very similar to the ones your body WOULD make after being vaccinated. They work by binding to the distinctive \"spike protein\" on the SARS-Cov-2 , marking it as a dangerous intruder and prompting your immune system to attack it. It is very similar to the antibody response your body WOULD make after being vaccinated, thereby assisting your immune system in fighting off the virus even if your immune system didn't respond well to the vaccine or if you were unable to be vaccinated for whatever reason. \n\nIt is not considered a vaccine because it does not prompt your body to produce its own antibodies. It is a timed-release drug: you get an injection of a large amount of medicine into tissue where it will take  several weeks for all of it to be distributed from that location throughout the body. But when they run out, they are gone, and your immune system has not learned to make them on its own. Think of Evusheld as being more like buying oranges from the grocery store, while getting a vaccine is more like planting an orange tree at your house.\n\nFor a much more technical and detailed explanation, [click here](https://www.evusheld.com/en/hcp) and say \"yes\" that you are a healthcare provider (nobody checks)", "upvote_ratio": 60.0, "sub": "AskScience"}320{"thread_id": "ukhxs7", "question": "So while we haven't discovered any life native to Mars, are there microorganisms that live on our planet that could survive on Mars?", "comment": "NASA did some studies where they sent stuff up into the upper atmosphere and simulated the conditions on Mars, and some of the spores survived.  So they believe that there  are some microbes on earth that could survive at least temporarily on Mars.\n\nHowever,  we haven't found any living organisms on earth that would probably thrive and reproduce successfully on Mars.\n\nThere are a few issues such a lifeform would have to deal with:  Higher radiation, cold temperatures, very low pressure and oxygen, and a good bit less sunlight.", "upvote_ratio": 290.0, "sub": "AskScience"}321{"thread_id": "ukj9av", "question": "Trying to understand the societal stigma", "comment": "Here in the US, the original impetus was fashion driven. It began in the 1920's when sleeveless dresses first came into vogue.\n\nThe hippy movement in the 1960's essentially rejected the notion that leg and armpit shaving was a necessity for women.\n\nIt's my understanding that many European women do not shave their pits or legs nor was it ever commonplace for them to do so.\n\nIt's essentially an artificial social construct.\n\n\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\n\nI know you didn't ask but one of the interesting aspects of aging for my 68 year old wife (which I assume may be hormonal) has been that the hairs on her legs and armpits has grown much thinner and less apparent over time.  She's got much less to shave these days than she once did.", "upvote_ratio": 1120.0, "sub": "AskOldPeople"}322{"thread_id": "ukj9av", "question": "Trying to understand the societal stigma", "comment": "Most of the body hair shaming came out of the razor industry. Gotta sell more blades!", "upvote_ratio": 800.0, "sub": "AskOldPeople"}323{"thread_id": "ukj9av", "question": "Trying to understand the societal stigma", "comment": "Lol - a lot of women don\u2019t shave in Europe and the rest of the world. Why should they?", "upvote_ratio": 490.0, "sub": "AskOldPeople"}324{"thread_id": "ukl0no", "question": "Throughout random readings I\u2019ve found that the Appalachians used to be larger than the Himalayas. Are there any new ranges currently forming and will any range formed ever be as large as the Appalachians considering tectonic plate movement is gradually slowing?", "comment": "The Himalaya are still forming as the Indian subcontinent continues to move north in collision with the Eurasian plate.\n\nThere is (relatively recently initiated) subduction in Southeast Asia as well, as part of the same collision currently building the Himalayas.", "upvote_ratio": 350.0, "sub": "AskScience"}325{"thread_id": "ukl0no", "question": "Throughout random readings I\u2019ve found that the Appalachians used to be larger than the Himalayas. Are there any new ranges currently forming and will any range formed ever be as large as the Appalachians considering tectonic plate movement is gradually slowing?", "comment": "There are several competing models for the future motion of continents. We're pretty confident Africa is going to continue North into Europe, which will probably close the Mediterranean and form a more continuous range across it. If East Africa rifts away from the rest of Africa, it may swing up to the north and collide with India, forming a long mountain range there, but geologists disagree on whether it will ultimately rift away.\n\nIn the far future, we generally expect a new supercontinent to form in something like 2-300 million years, but there's a handful of different models for what that will ultimately look like.\n\n> tectonic plate movement is gradually slowing\n\nThat's not clear. Some studies seem to suggest it's actually been speeding up; the data is too patchy to be sure. But either way it won't change significantly on these timescales. We also can't really be sure exactly how high any past mountain ranges are, so we can't really make these sorts of direct comparisons.", "upvote_ratio": 90.0, "sub": "AskScience"}326{"thread_id": "ukl0no", "question": "Throughout random readings I\u2019ve found that the Appalachians used to be larger than the Himalayas. Are there any new ranges currently forming and will any range formed ever be as large as the Appalachians considering tectonic plate movement is gradually slowing?", "comment": "I've peppered the other responses that were here with this, but for the sake of completeness, **this question is fundamentally unanswerable beyond vague generalization**. As touched on by /u/loki130 in their answer (and discussed in some detail in one of our [FAQs](https://www.reddit.com/r/askscience/wiki/planetary_sciences/future_continents)), projections of future plate configurations are uncertain, so even defining *where* there might be new mountains forming in the geologic future is problematic. Even if we did know where, i.e., the plate configurations were certain, we would not have any basis with which to accurately project the rate of plate motion (which controls the rate of convergence between the plates and influences the rates of rock uplift and topographic growth), the geometry of main structures that would develop (which control how a given rate of horizontal convergence is translated into vertical motion growing topography), or the climatic context of the range that would form (which controls the details of erosional process and will ultimately dictate what the *equilibrium* height of the range is, i.e., how steep and tall does the topography need to be to balance rock uplift). And those are the main things that we might be able to make vague generalizations about, there a whole host of \"what ifs\" that could dramatically influence the topographic evolution that we would have basically zero way of predicting for a hypothetical future collision, e.g., will there be slab detachment? will there be crustal delamination? when might these occur in the lifespan of the range? etc etc. The extreme challenge of all of these pieces working together and reconstructing enough of them to work out details of past mountain range geometry/topography is bad enough (and well described by [van Hinsbergen & Boschman, 2019](https://www.science.org/doi/10.1126/science.aaw7705)), but the problem is compounded for future projections (where by definition, we have no records, only extrapolation).", "upvote_ratio": 40.0, "sub": "AskScience"}327{"thread_id": "ukledy", "question": "Why does the cost of left and right move is 1 but the the cost of up and down moves is 2.\n\n[https://imgur.com/a/oQV9AII](https://imgur.com/a/oQV9AII)", "comment": "I don't know, at a glance, what heuristic they're using. There are a few popular ones. Eg: [Solving the 8-Puzzle using\nA* Heuristic Search](https://cse.iitk.ac.in/users/cs365/2009/ppt/13jan_Aman.pdf).\n\nThe \"1\" and \"2\" numbers might be talking about the relative scores between choices, not the overal \"score of the board\", which is the usual scoring used.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}328{"thread_id": "ukllyj", "question": "As a young person, the world seems so heavy anymore and the future looks so dark. I know we\u2019re not the first group of people to live through difficult times, but I can\u2019t ever recall feeling so hopeless. \n\nI keep seeing suicides increasing around me and yesterday I had multiple conversations with my friends where we were all crying. \ud83e\udd72\n\nIs there hope? What advice do you have?", "comment": "Public Policy Analysis is my profession.\n\nI have a hard truth you need to learn to accept...\n\nThe world is fine.\n\nThe future is very bright.\n\nFear mongers sell fear because people buy it, that's all.\n\n Is there shit going on?  Sure.  There's always shit going on.  Same old same old.", "upvote_ratio": 60.0, "sub": "AskOldPeople"}329{"thread_id": "ukllyj", "question": "As a young person, the world seems so heavy anymore and the future looks so dark. I know we\u2019re not the first group of people to live through difficult times, but I can\u2019t ever recall feeling so hopeless. \n\nI keep seeing suicides increasing around me and yesterday I had multiple conversations with my friends where we were all crying. \ud83e\udd72\n\nIs there hope? What advice do you have?", "comment": "There's always hope. Things do seem totally f-ed. I never thought that my generation (X) would have to step up. We were promised 'the end of history' - like in a good way. That hasn't panned out. Things will be different than what we wished, how could it be otherwise? No one knows the future.\n\nI think that it helps to take action of some kind, whether that's doing something kind for yourself (therapy or self care) or political, or in your community or family.\n\nFoster personal connection. Lean on your friends and let them lean on you.\n\nAlso have things to look forward to: small or big trips, events, people you'll see, chances to play or do good work. \n\nGet perspective. Most of history was deeply horrible for many people. It's being not-horrible that's odd. Black death, anyone? It may not be what you thought it would be, but you can only start from where you are. \n\nGet your self-talk turned around. You can do it. Today can be good. Nothing is promised, do it now. \n\n(Btw, I don't have it together. These are just the things I tell myself when I'm down.)", "upvote_ratio": 50.0, "sub": "AskOldPeople"}330{"thread_id": "ukllyj", "question": "As a young person, the world seems so heavy anymore and the future looks so dark. I know we\u2019re not the first group of people to live through difficult times, but I can\u2019t ever recall feeling so hopeless. \n\nI keep seeing suicides increasing around me and yesterday I had multiple conversations with my friends where we were all crying. \ud83e\udd72\n\nIs there hope? What advice do you have?", "comment": "There is always horror and there is always hope. Imagine the Jewish people who lived through the Holocaust- there must have been many who chose suicide, or simply gave up.But there were many more who insisted on living despite the best efforts to kill them all. That was a dark time. \n\nThis is a dark time too, but for different reasons. It might seem that there is no hope for the world. But that\u2019s a dark lens to be looking through and it robs you of the will to fight. Look for even the small things that give you hope or comfort and find ways to amplify them. Horror and hope, it\u2019s there all around us. We get to choose which we grasp.", "upvote_ratio": 30.0, "sub": "AskOldPeople"}331{"thread_id": "ukoeuy", "question": "Hi all. I really struggle understanding programming, because there's so much vocabulary, and I get really frustrated with how redundant and contrived some of it seems to me. I'm a smart guy, but I have no patience when someone starts \"speaking\" a programming language to explain a programming concept.\n\nRight now, I'm trying to understand why a string literal, literally the string of characters, is not just called a \"string\". So far, the answers I've found are \"it's Java\" and \"it's the data in the variable\", and it's \"the initialized variable\"... Which to me, just sounds like \"it's the string\", \"it's THIS string\" and \"it's irrelevant and I shouldn't have mentioned it\"\n\nIs there any actual reason to call something a literal, specifically in the context of python? Or is it just a synonym for the actual string/integer/whatever in question? Is the string literal, literally the string, and if so, who decided that? Does Merriam Webster know about this?", "comment": "If you were to write:\n\n    String A = \"my string\";\n\nThat's using a literal to assign to A\n\nIf you then wrote:\n\n    String B = A;\n\nYou are no longer using any string literals. A string literal is a piece of syntax. You would never refer to a variable as a string *literal*, only text enclosed in quotation marks is a string literal.", "upvote_ratio": 160.0, "sub": "AskComputerScience"}332{"thread_id": "ukoeuy", "question": "Hi all. I really struggle understanding programming, because there's so much vocabulary, and I get really frustrated with how redundant and contrived some of it seems to me. I'm a smart guy, but I have no patience when someone starts \"speaking\" a programming language to explain a programming concept.\n\nRight now, I'm trying to understand why a string literal, literally the string of characters, is not just called a \"string\". So far, the answers I've found are \"it's Java\" and \"it's the data in the variable\", and it's \"the initialized variable\"... Which to me, just sounds like \"it's the string\", \"it's THIS string\" and \"it's irrelevant and I shouldn't have mentioned it\"\n\nIs there any actual reason to call something a literal, specifically in the context of python? Or is it just a synonym for the actual string/integer/whatever in question? Is the string literal, literally the string, and if so, who decided that? Does Merriam Webster know about this?", "comment": "A \"string literal\" is something that occurs in your *source code*, marked by quotation marks. It's  distinct from the string *object* that exists when your program is running. String literals are one way to create strings, but not the only way.\n\nIf you say:\n\n    s = \"abc\"\n\nthen the string literal `\"abc\"` in your source code tells the Python runtime environment to create a string object whose data consists of the characters `a`, `b` and `c`. And the variable *s* refers to that string object.\n\nBut if you do this:\n\n    s = str(5*5)\n\nyou will get a string whose data contains the characters `2` and `5`, even though there is no string literal `\"25\"` in your program.\n\nThere are other kinds of literals, too. For instance, when you write an integer value in your code, you're actually writing an integer literal. But the decimal literal `25`, the hexadecimal literal `0x19` and the binary literal `0b11001` are all ways to describe the same integer value. (Or to put it differently, they all *evaluate to* integer objects with the same value.)", "upvote_ratio": 130.0, "sub": "AskComputerScience"}333{"thread_id": "ukoeuy", "question": "Hi all. I really struggle understanding programming, because there's so much vocabulary, and I get really frustrated with how redundant and contrived some of it seems to me. I'm a smart guy, but I have no patience when someone starts \"speaking\" a programming language to explain a programming concept.\n\nRight now, I'm trying to understand why a string literal, literally the string of characters, is not just called a \"string\". So far, the answers I've found are \"it's Java\" and \"it's the data in the variable\", and it's \"the initialized variable\"... Which to me, just sounds like \"it's the string\", \"it's THIS string\" and \"it's irrelevant and I shouldn't have mentioned it\"\n\nIs there any actual reason to call something a literal, specifically in the context of python? Or is it just a synonym for the actual string/integer/whatever in question? Is the string literal, literally the string, and if so, who decided that? Does Merriam Webster know about this?", "comment": "I share your frustration with things that seem redundant and contrived.  A lot of things in CS seem that way at first, but very few actually are.  The vast majority of CS was codified by quite thoughtful, clever people, many of whom had a formal math background.  This means they were used to defining things very narrowly and carefully.\n\nIn your case, a string is a complex data type, an object, which holds an ordered list of characters along with some metadata and associated functions.  If you define that list of characters in the source code literally, i.e. if you write \"this is a string\", that is the contents of the string object at runtime too, and it doesn't change.  If you reserve a variable name for a string whose contents is unknown at the time of writing but will be determined at runtime (i.e. user input, network data, etc), you can use the contents of said variable as a string in your code even though you do not know the value it will eventually hold - it is a string but not a literal.", "upvote_ratio": 60.0, "sub": "AskComputerScience"}334{"thread_id": "ukp3eb", "question": "What is the difference between these waves that allows something like a camera to work or not work?", "comment": "[removed]", "upvote_ratio": 9380.0, "sub": "AskScience"}335{"thread_id": "ukp3eb", "question": "What is the difference between these waves that allows something like a camera to work or not work?", "comment": "Some pretty poor answers, so I'm obliged to post a reply.\n\nTheoretically, there is no reason why we cannot build antenna for optical wavelengths and camera for radio wavelengths, and there are examples\n\nAlso, note that antenna and camera are devices that are designed to do different things - so you are not exactly comparing 2 equivalent devices.  \n\nA camera is designed to do imaging - the output is a map of intensities vs. angular positions (or a 'movie' if you take data over time).  In a camera, there is usually an 'optical element', such as a lens (or a system of lenses), a curved mirror (or a set of mirrors and lenses), or a simple aperture, that maps incoming light wave from 1 direction to excite only 1 detector element among an array of detector elements.  This array of detector element can be either an array of solid state detectors - analog pin diodes, CCD (Charge Coupled Devices), CMOS detectors - or a thin film of photo-sensitive emulsion layer (aka photographic film).\n\nAn antenna is designed to detect intensity from all directions combined (although not all directions are given the same weight, depending on the antenna geometry) over time.  An antenna is basically a detector sitting out in the open without any optical element.\n\nOptical antenna does exist.  When you push a button on an IR remote control for you flat panel TV, the signal is picked up by an optical 'antenna'.\n\nThe closest thing to a radio camera is a radio telescope.  Here, an optical element 'high gain antenna' which is a curved reflector that selects radio wave incoming from 1 angular direction, and feeds it to an antenna, and then you swing around the entire assembly to generate a map of intensities vs. angular position.  Think of this as a one pixel camera.\n\nSource: PhD in optoelectronics", "upvote_ratio": 4100.0, "sub": "AskScience"}336{"thread_id": "ukp3eb", "question": "What is the difference between these waves that allows something like a camera to work or not work?", "comment": "The energy they contain is the difference. Radio waves are very weak when compared to visible light or UV. The antenna gives a bigger surface area and also is useful because the wave length of the radio waves is very big for a small receiver like a camera to capture. In simple words its due to the wave length that we need a different kind of setups for every other form of radiation IR needs a specific set of lasers and UV needs a filter to differentiate it from the visible light etc. The longer the wavelength the bigger your sensors have to be. Radio waves has the biggest wavelength so we need a highly sensitive antenna which is at least one quarter wavelength wide or high.\n\nEdit : someone in comments corrected a error.\nEdit 2: I had another error corrected by someone.", "upvote_ratio": 480.0, "sub": "AskScience"}337{"thread_id": "ukpc15", "question": "I'm studying ichthyosaur fins for my university dissertation, and I'm looking at polyphalangy (defined as phalanges branching from digits) and hyperphalangy (additional phalanges added linearly onto digits) (see this image from Fedak and Hall, 2004 [https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1571266/figure/fig01/](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1571266/figure/fig01/)).\n\nObviously there's polydactyly in humans, with extra fingers, but I was wondering if there's 'hyperdactyly', with more than 3 phalanges in a finger? I'd imagine that if both conditions occur in ancient organisms then they could also occur in humans?\n\nedit: terminology", "comment": "Yes!  [There have been rare cases of hyperphalangy in humans ](https://onlinelibrary.wiley.com/doi/abs/10.1002/ajmg.1320460215), also sometimes referred to as having \u201csupernumerary phalanges\u201d. [In hyperphalangy associated with Brachydactyly Type C,](https://rarediseases.org/gard-rare-disease/brachydactyly-type-c/) the bones of the index and/or middle finger are shorter, but sometimes one is duplicated. In cases of Catel-Manzke syndrome, there can be a host of other skeletal defects, but also sometimes a single extra duplicated phalange in the index finger. And there is a condition called [triphalangial thumb](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6297898/) where the thumb has three phalanges instead of two.\n\nNone of these have much in common with the hyperphalangy of whales, ichthyosaurs or plesiosaurs\u2026where there are many, many extra phalanges. (Actually whales are a little more constrained than the reptiles but still.) Human hyperphalangy is nearly always limited to a single extra phalange in one or two digits.", "upvote_ratio": 150.0, "sub": "AskScience"}338{"thread_id": "ukpoiq", "question": "Are there any examples of a species disappearing from the fossil record because of a predator species being so successful in hunting it? (Other than extinctions humans have caused?)", "comment": "Fossilization is actually a pretty rare phenomenon. Only a tiny fraction of all living beings get trapped as fossils. That make it pretty difficult to make the types of conclusions you are asking about using the fossil record.", "upvote_ratio": 330.0, "sub": "AskScience"}339{"thread_id": "ukpoiq", "question": "Are there any examples of a species disappearing from the fossil record because of a predator species being so successful in hunting it? (Other than extinctions humans have caused?)", "comment": "Here\u2019s a paper suggesting that gnathostomes (jawed fish) heavily predated on agnathostomes (jawless fish), contributing to extinction of ostracoderms (armoured jawless fish) in the Upper Devonian (around 372MYA) \n\nBite marks and predation of fossil jawless fish during the rise of jawed vertebrates\n\nhttps://royalsocietypublishing.org/doi/10.1098/rspb.2019.1596", "upvote_ratio": 40.0, "sub": "AskScience"}340{"thread_id": "ukpoiq", "question": "Are there any examples of a species disappearing from the fossil record because of a predator species being so successful in hunting it? (Other than extinctions humans have caused?)", "comment": "this indubitably happens often, if a generalist predator hunts 2 prey animals, one that can cope with the hunting and another that cannot, the one that cannot will go extinct/disappear from the area because even if their numbers decrease the predators won't become more rare. the smaller the area and the lower the population the more likely this would be. any animals that develop on islands usually meet this fate when introduced to species from the mainland. \n\nI can't recall exactly where but certain giant bugs that evolved on island cannot handle rats that were introduced there for example, so they are probably going to go extinct once we stop protecting them. \n\nspecies that co-evolved as the hunter and the prey are much less likely to have this happen to them, for example when there are many lynx the number of rabbits decreases dramatically, but when they run out of food the lynx start dying en-masse allowing rabbit populations to skyrocket, making the lynx population rise back up soon after over and over again.", "upvote_ratio": 30.0, "sub": "AskScience"}341{"thread_id": "ukqpkp", "question": "For example, dogs experience nausea and it is often indicated by drooling and excessive swallowing, and anti-emetic medications work for dogs. But outside of observed behaviors, do scientists have other ways of knowing whether nausea is something that all mammals experience? Could it be determined by studying mammalian brains?", "comment": "Nausea is a subjective experience of a physiological phenomenon. It's qualia rather than an objective, measurable state. We can definitely say that animals experience the physiological indicators of nausea but whether they experience nausea as a subjective, conscious thing is an extremely difficult and perhaps impossible question to answer.\n\nIt's like pain vs nociception.", "upvote_ratio": 80.0, "sub": "AskScience"}342{"thread_id": "ukqti1", "question": "Are there foods that actually are superfoods? I mean, are there any foods out there that extremely effect your body from just one eat?", "comment": "Superfood :\n\n>The term has no official definition by regulatory authorities in major consumer markets, such as the United States Food and Drug Administration and Department of Agriculture or the European Food Safety Authority. It appears to have been first used in a Canadian newspaper in 1949 when referring to the supposed nutritional qualities of a muffin.\n\nalso:\n\n>According to Cancer Research UK, \"the term 'superfood' is really just a marketing tool, with little scientific basis to it\".\n\nIt is generally accepted that diet and dietetics should be approached in the form of a nutrition plan and not a list of foods.  It is important to favour a varied diet and to cook unprocessed food, stuffing yourself with \"super food\" will only have an effect on your wallet.", "upvote_ratio": 27250.0, "sub": "AskScience"}343{"thread_id": "ukqti1", "question": "Are there foods that actually are superfoods? I mean, are there any foods out there that extremely effect your body from just one eat?", "comment": "[removed]", "upvote_ratio": 12130.0, "sub": "AskScience"}344{"thread_id": "ukqti1", "question": "Are there foods that actually are superfoods? I mean, are there any foods out there that extremely effect your body from just one eat?", "comment": "> Are there foods that actually are superfoods? \n\nNo, \"superfood\" is a marketing term, it has no unofficial or official definition and is just being used to try to sell things to you. \n\nThe term 'superfood\" is being applied to foods that are claimed to be better for you and healthier if consumed in moderate amounts over a lifetime. Problem is, almost ALL natural foods (excluding highly processed products) can be superfoods in a way, a widely varied diet that's made up mostly (but not exclusively) of good quality vegetables and fruits (of all colors), lower glycemic index starches like whole grains and beans,  oily fish, nuts, eggs, fermented foods, and small amounts of lean meats, definitely has health benefits. However, no food is a \"superfood\" in the sense that if you ate just that one food, or ate large amounts of it every day to the exclusion of other types of food, you would be healthier or live longer than someone with a more moderate, varied diet. \n\n>I mean, are there any foods out there that extremely effect your body from just one eat?\n\nWater. Otherwise, no, not really.... unless your body is extremely deficient in one nutrient or another because of a lack of intake. Even then, it takes more than one serving, and more than a day or two, for your body to repair damage from a deficiency disorder. Scurvy or vitamin C deficiency for instance, takes a couple days of treatment to see any improvement at all, and takes weeks or months to cure.", "upvote_ratio": 4340.0, "sub": "AskScience"}345{"thread_id": "ukr4cx", "question": "How was your sex life in the 60s and the 70s?", "comment": "Non-existent. The 80s, however, are a different story.", "upvote_ratio": 50.0, "sub": "AskOldPeople"}346{"thread_id": "uksg30", "question": "Curious if this is something not talked about as much when you\u2019re young \u2014 how many of you and your friends have virgin teeth? As opposed to dentures, veneers, crowns etc.", "comment": "My husband is 13 years younger than me and and he ended up with a complete set of false teeth last year at 45. \n\nI'm coming up on 59 this year and it looks like I'll be in the same boat in a few years. We really both lost the genetics lotteries in both of our families.\n\nIt's not just that though. Speaking for myself, I had years of jobs with no health care where I thought just brushing my teeth was enough. Each time I'd end up with good Dental Care, we'd play catch up with deep cleanings, more fillings and crowns over that were covered in my plans each year and so on. But eventually, you can't catch up any more and I wasn't able to make up for years of brushing but not flossing + genetics. Depression had it's hand in there as well.\n\nWhat ever age you are, but especially if you are young, make a commitment to start taking better care of your teeth. If you already do, keep it up!", "upvote_ratio": 640.0, "sub": "AskOldPeople"}347{"thread_id": "uksg30", "question": "Curious if this is something not talked about as much when you\u2019re young \u2014 how many of you and your friends have virgin teeth? As opposed to dentures, veneers, crowns etc.", "comment": "I won't tell you the story of my soft teeth and bad gums. It's been a horrible struggle, but at 78 I have full dentures that snap in for strength. At least the pain is finally gone.", "upvote_ratio": 350.0, "sub": "AskOldPeople"}348{"thread_id": "uksg30", "question": "Curious if this is something not talked about as much when you\u2019re young \u2014 how many of you and your friends have virgin teeth? As opposed to dentures, veneers, crowns etc.", "comment": "I had my first 2 crowns in my 20s.   It's not just an age thing.", "upvote_ratio": 340.0, "sub": "AskOldPeople"}349{"thread_id": "ukt5rb", "question": "This is mostly regarding psychoactive substances, but it seems for most substances, the half-life is much longer than the duration you actually feel the drug's effects.\n\nTake ativan for example. It's half life seems to be around 12 hours, although apparently a better estimate is between 10 and 12 hours. Yet it does not seem to ease anxiety for nearly that long. Another example would be adderall. It's half life is over 12 hours, yet its effects last for around 6 hours.\n\nEven alcohol seems to be weird in this regard. It's half-life is 4-5 hours, but you're also able to process a drink in around an hour. If I had a drink and then waited an hour, I would blow a 0.0 BAC, but it would still be in my system?\n\nCan anyone clear this up for me? Is it that the drugs still have a psychoactive affect, but it is just no longer noticeable or what?", "comment": "The answer is that the processes involved are complicated. For oral drugs, absorption peaks some time after digestion, so there is not a simple decay, more of a peak followed by a drop off. In addition, the effect of most drugs are not linearly dependent on the concentration in the target tissue, because of saturation effects, among other complications.  \n\n\nhttps://en.wikipedia.org/wiki/Bioavailability", "upvote_ratio": 90.0, "sub": "AskScience"}350{"thread_id": "ukt5rb", "question": "This is mostly regarding psychoactive substances, but it seems for most substances, the half-life is much longer than the duration you actually feel the drug's effects.\n\nTake ativan for example. It's half life seems to be around 12 hours, although apparently a better estimate is between 10 and 12 hours. Yet it does not seem to ease anxiety for nearly that long. Another example would be adderall. It's half life is over 12 hours, yet its effects last for around 6 hours.\n\nEven alcohol seems to be weird in this regard. It's half-life is 4-5 hours, but you're also able to process a drink in around an hour. If I had a drink and then waited an hour, I would blow a 0.0 BAC, but it would still be in my system?\n\nCan anyone clear this up for me? Is it that the drugs still have a psychoactive affect, but it is just no longer noticeable or what?", "comment": "There's a threshold concentration in the body needed for an effect to be observed.\n\nWhether or not that threshold is achieved, and for how long, depends on the size of the dose, the number of doses and the time between doses.\n\nThe half-life is just the amount of time it takes for half the drug to be cleared (assuming the kinetics meets certain conditions). It has no direct relationship to the effect of the drug. A well-designed dosing regimen ensures that the concentration of the drug stays above the required levels necessary to have an effect, even taking account the half-life.\n\n[This is a good illustration](https://www.cambridgemedchemconsulting.com/resources/ADME/halflife_files/repeated.png).", "upvote_ratio": 50.0, "sub": "AskScience"}351{"thread_id": "ukt5rb", "question": "This is mostly regarding psychoactive substances, but it seems for most substances, the half-life is much longer than the duration you actually feel the drug's effects.\n\nTake ativan for example. It's half life seems to be around 12 hours, although apparently a better estimate is between 10 and 12 hours. Yet it does not seem to ease anxiety for nearly that long. Another example would be adderall. It's half life is over 12 hours, yet its effects last for around 6 hours.\n\nEven alcohol seems to be weird in this regard. It's half-life is 4-5 hours, but you're also able to process a drink in around an hour. If I had a drink and then waited an hour, I would blow a 0.0 BAC, but it would still be in my system?\n\nCan anyone clear this up for me? Is it that the drugs still have a psychoactive affect, but it is just no longer noticeable or what?", "comment": "On my opinion, the key is distribution. Usually half life is expressed in a certain media (eg plasma, brain, whole organism, etc). That localization though may not be relevant to the effect the drug is supposed to do. Without specific knowledge about it, and taking your example (all data is not validated and given to exemplify the case) for alcohol:\n1. Ingestion. Assuming no metabolism yet.\n2. Absorption through GI tract. Assuming 100% bioavailability within 30 min. There will be a peak after 15 min.\n3. All the alcohol is in blood but it starts to distribute from t0 to brain, liver, etc.\n4. Brain is no good processing alcohol, so whatever fraction makes it, causes the effect to your conduct. What you really experience. After 1h, the effect is gone as either your receptors saturate (you'll only feel pressure in your arm for a couple of minutes, after that, you don't feel it anymore) or otherwise there is no more input from other sources. Keep drinking and you'll keep feeling drunk.\n5. Liver instead, keeps working hard at metabolizing alcohol, into substances such as fat, sugars, or other substances that will be excreted from the body.\n6. Some other tissues may accumulate more or less alcohol or their metabolites.\n7. Eventually, all alcohol is eliminated from the body.\nIn this case, half life could refer to the amount of time alcohol would be showing up in a blood test, or accumulation in the whole body (all organs).\nBoth cases are very different and can clearly illustrate how half life doesn't always correlate with effect.\nHope this helps.", "upvote_ratio": 30.0, "sub": "AskScience"}352{"thread_id": "uktxrb", "question": "I'm pretty new to programming. I've learned only Python yet and some Django too. I was thinking about starting to learn Rust but I don't know anything about... So can anyone tell me if I should learn it or not.. if yes, what type of things can I do with this language?..", "comment": "As you can imagine, this is a pretty common question. If you Google it, you'll probably get some reasonable stuff in the first page of results. I'll highlight an interesting posts taking the opposite angle, why you might _not_ want to learn Rust, written a well-known Rustacean: https://matklad.github.io/2020/09/20/why-not-rust.html", "upvote_ratio": 80.0, "sub": "LearnRust"}353{"thread_id": "uktxrb", "question": "I'm pretty new to programming. I've learned only Python yet and some Django too. I was thinking about starting to learn Rust but I don't know anything about... So can anyone tell me if I should learn it or not.. if yes, what type of things can I do with this language?..", "comment": "\\>> what type of things can I do with this language\n\nIn a nutshell: Rust tries to solve a problem that other languages tend to solve in a different way, but with downsides. Which is that its difficult to manage memory. Other languages like JS and Python solve this by completely taking this problem off your hands by using a garbage collector. the downside is that those languages have a tendency to be slower.\n\nBut note that this downside is not always a problem. Usually it isn't. \n\nSo if you're looking for a language that can be very fast, and also helps you to avoid very complicated bugs, then rust is great. \n\nDo note that it really helps if you know other languages first. So maybe dont start out with Rust.\n\nIts also a nice language in general, albeit with a steep learning curve. But once you get it, it kinda clicks very nicely.", "upvote_ratio": 30.0, "sub": "LearnRust"}354{"thread_id": "uktxrb", "question": "I'm pretty new to programming. I've learned only Python yet and some Django too. I was thinking about starting to learn Rust but I don't know anything about... So can anyone tell me if I should learn it or not.. if yes, what type of things can I do with this language?..", "comment": "I wouldn\u2019t recommend learning rust for a beginner. I recommend keep going with more mature and higher-level languages such as python or JavaScript", "upvote_ratio": 30.0, "sub": "LearnRust"}355{"thread_id": "ukv31g", "question": "Can a region anywhere on earth possibly experience the worst climate in the next 5 or 10 years rather than   in 50-70 years in this century? Or will climate change make it certain that the worst is going to happen only after 50 or so years?", "comment": "This is hard to answer with certainty. To understand why, we can do a little thought experiment, but it first requires that we think a bit about how we describe the statistics of \"extreme weather\". For our \"extreme weather\", let's specifically focus on rainfall. We generally expect rainfall (i.e., storm) events for a particular region to be characterized by a probability distribution. There are a few different distributions that have been used for rainfall, and specifically to describe the frequency of large events, but for this, we'll follow [Wilson & Toumi, 2005](https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2005GL022465) and consider the [Weibull distribution](https://en.wikipedia.org/wiki/Weibull_distribution) (note that Wilson & Toumi discuss this as the stretched exponential, which is just the name given to the complementary cumulative distribution function of the Weibull distribution). In the context of the Weibull, there are two parameters that define a probability of an event, a scale parameter (which relates to the mean storm depth, i.e., the mean magnitude of rainfall events, typically considered in terms of daily means) and a shape parameter (which relates to the frequency of storms). Together, these define the probability of a particular magnitude of storm event occurring. Also of relevance is that largely we can consider the probability of rainfall events as time independent, meaning that the probability of a given magnitude event does not change as a function of the past history (i.e., if there is a 1% chance of a storm that produces 15 mm of rain in day and such a storm occurs, the probability of another storm producing 15 mm of rain is still 1% the next day).\n\nNow, bringing in climate change, generally for a given region, Wilson & Toumi argue that the variability of events (i.e., the shape parameter) for rainfall distributions are not likely to change, but that the mean depth (i.e., the scale parameter) will change. If we assume this is correct, because the scale changes though time, the magnitude of a given probability event will change, e.g., if the scale increases the magnitude of what was a rainfall event with a 2 year return period will increase. \n\nWhy does all this matter? If we think about assembling a hypothetical time series for the next 50 years assuming we knew how the scale parameter for a particular place would change, e.g., we knew in 50 years the scale parameter would go from 5 to 10 so we broke our future record into 5, 10 year long steps and at each step drew 10 years worth of random daily means based on the current shape parameter and future scale parameters and then assembled that into our \"record\". Now, over time, larger events (with respect to the modern) would become more common as the underlying distribution shifted to the right, but statistically within particular decade you were in with a fixed shape and scale the probability of extreme events would not be changing. Looking over the whole 50 year record though, the most likely outcome would be that you would see larger (i.e., more extreme) events further in the future specifically if you're considering them with reference to what constituted \"extreme\" at the beginning of the record. This would broadly suggest that the scenario you laid out (that there is more extreme weather in the next 10 years than in the following 40) would be unlikely. However, because we're considering these as time independent probabilities, there's nothing theoretically to preclude a scenario where an extremely low probability event (i.e., a very large event) occurs early in the record, which is not exceeded in the remainder of the 50 year record even with the shift in the mean. Importantly, this is focused just on rainfall (where the other types of events may have different changes in their probabilities), is ignoring a lot of complications (changes in seasonality, etc), and assuming that Wilson & Toumi's arguments about global trends hold locally (i.e., there might be areas where both the scale and shape parameter will change, which would complicate our thought experiment a bit), but highlights that dealing with stochastic processes like storms and making definitive statements about very detailed future trends is problematic (and also why tying a single, low probability event to climate change is challenging, but defining trends in changes in extreme events more broadly is possible).", "upvote_ratio": 80.0, "sub": "AskScience"}356{"thread_id": "ukvh8x", "question": "I recently learned how avocados are not true to seed plants and by that meaning planting them doesn't give you the same fruit.\n\nThis is very intriguing and strange. Aren't we all the product of our DNA. And isnt that DNA embedded within the seed?", "comment": "some species have male/female plants.\n\nthere you get a mix of genes from each parent, and so the offspring will be mixed.\n\nother plants can be hermaphraditic, or self-fertilizing (all the genes come from the same single parent.)  So their offspring are more like clones (true to seed).\n\n\nim pretty sure thats pretty close to the deal....", "upvote_ratio": 30.0, "sub": "AskScience"}357{"thread_id": "ukwuee", "question": "There's likely to be a major interaction between our galaxy and the Andromeda Galaxy at some point. There are models showing what we expect to happen. Have we imaged anything that looks like galaxies interacting, or the remnants of that interaction? How closely do they resemble the models?", "comment": "We've seen plenty of interacting and merging galaxies - it happens quite frequently in the universe between all different shapes and sizes of galaxies - and they tend to somewhat resemble merging models (within reason) because the models tend to be based on observing these galaxies and trying to model how they behave: if the models didn't resemble the galaxies, they wouldn't be very good models..\n\nSome rather famous examples of merging galaxies include the whirlpool galaxy: [https://en.wikipedia.org/wiki/Whirlpool\\_Galaxy](https://en.wikipedia.org/wiki/Whirlpool_Galaxy)\n\nThe antennae galaxies: [https://en.wikipedia.org/wiki/Antennae\\_Galaxies](https://en.wikipedia.org/wiki/Antennae_Galaxies)\n\nAnd quite a few others: [https://en.wikipedia.org/wiki/Category:Interacting\\_galaxies](https://en.wikipedia.org/wiki/Category:Interacting_galaxies)\n\nNearly every galaxy in the universe has undergone quite a few large mergers at some point in its history, and we believe elliptical galaxies tend to be the end result of tons and tons of mergers over billions of years. Elliptical galaxies lack any clear structure, instead being a hazy roughly-ellipsoid cloud of stars on random, chaotic orbits. They also tend to lose most or all of their gas & dust, stunting new star formation and leaving mostly older, smaller stars.\n\nWe don't really have any exceptional ellipticals as close to us as Andromeda to reference, but many nearby galaxy groups do have massive elliptical galaxies in them, such as Messier 87 in the Virgo cluster: [https://en.wikipedia.org/wiki/Messier\\_87](https://en.wikipedia.org/wiki/Messier_87) \n\nAlthough this galaxy is way more massive than anything the Milky Way and Andromeda could form, it is a rough idea of what such a combined galaxy may end up looking like in the distant future, after the initial chaos of the merging galaxies settles down.", "upvote_ratio": 320.0, "sub": "AskScience"}358{"thread_id": "ukxkgu", "question": "And would this also increase volcanic activity on the side facing away from the star?", "comment": "If the planet is tidally locked then we are in a one sided equilibrium. The tidal force still exists but there is no spatio-temproal variation, that is, given a point in space on the planet the tidal force remains constant in time. So all that tides then do is act to adjust the equilibrium shape of the body.\n\nYou can be tidally locked and still have some tidal effects such as from precession due to a slight departure from a perfectly circular orbit (like occur for the Moon). However, these are negligibly small.", "upvote_ratio": 310.0, "sub": "AskScience"}359{"thread_id": "ukxkgu", "question": "And would this also increase volcanic activity on the side facing away from the star?", "comment": "What habitable zone do you think has to do with volcanic activity?\n\nAnyway, /u/dukesdj already answered to your question.\n\nIf you was thinking something about habitability, then I could add to that that tidally locked planets aren't best candidates, they probably don't have much water on the hot size, and they probably would have frozen oceans on the cold side, with only a small barely habitable strip of land along terminator line, but it probably would experience immense winds. I could speculate that it would probably be a cold winds, as denser cold air would travel closer to the ground from cold to hot side, heat up there, uprise and then travel back to the cold side at top of the troposphere.", "upvote_ratio": 70.0, "sub": "AskScience"}360{"thread_id": "ukxqb1", "question": "7/45 of the worlds biggest caves are in Georgia, including the top 4. Why is this? What is so special about the geology of such a small country that in contains such deep caves?", "comment": "Georgia has a lot of conditions that favor cave (karst) formation, mostly related to aspects of the formation of the Greater Caucasus mountains which dominate much of geography of the country. Specifically, there's a lot of limestone (because the rocks of the Greater Caucasus reflect a marine basin that was closed and deformed), it's very wet (in part because the Caucasus interact with the Westerlies to concentrate a significant amount of precipitation to fall on their southwestern side, i.e., Georgia), there's a lot of groundwater (again, likely in part related to the humid conditions, plus a lot of conduits for fluid flow via faults related to the formation of the Greater Caucasus), there's active magmatism which provides a lot of dissolved gases which can help react with carbonates plus active hydrothermal systems (again likely related to the Greater Caucasus, but the exact origin of the magmatism in this region remains a bit elusive), and their is a lot of relief (where the \"erosional base level\" and changes in it can influence the depth of cave systems that develop). Karst geology is not my specialty (the geology of the Caucasus is though), but based on a basic understanding of karst processes (e.g., [Ford & Williams, 2007](https://onlinelibrary.wiley.com/doi/book/10.1002/9781118684986)), all of the factors above would contribute (at least in part) to making Georgia an ideal environment for making large karst systems. Maybe someone with more expertise in karst processes specifically can fill in some additional details.\n\n**EDIT:** For the variety of people responding with things about the US state of Georgia, both OP and I are talking about the country of [Georgia](https://en.wikipedia.org/wiki/Georgia_%28country%29).", "upvote_ratio": 22200.0, "sub": "AskScience"}361{"thread_id": "ukxqb1", "question": "7/45 of the worlds biggest caves are in Georgia, including the top 4. Why is this? What is so special about the geology of such a small country that in contains such deep caves?", "comment": "I remember a story of cavers exploring a previously unexplored cave in Georgia. As they were deep in the cave, they came across a chasm that seemed to go down forever. And what was even more surprising was that somebody had tied a rope that went to the chasm. As far as they knew, they were the first people there. So they started going down the chasm, and found a dead body hanging from the rope 1 kilometre down. There was about 1 more kilometre to go to the bottom.\n\nPreviously, on Reddit: https://www.reddit.com/r/todayilearned/comments/qjjp3s/til\\_about\\_the\\_veryovkina\\_cave\\_the\\_worlds\\_deepest/", "upvote_ratio": 40.0, "sub": "AskScience"}362{"thread_id": "ukxtkg", "question": "\u201cThe first article that I wrote for the elementary school newspaper was  on the fall of Barcelona \\[in 1939\\],\u201d\n\n\u201cI haven\u2019t changed my opinion since, it\u2019s  just gotten worse,\u201d\n\n\u201cwe\u2019re approaching the  most dangerous point in human history\u2026 We are now facing the prospect of  destruction of organised human life on Earth.\u201d\n\n\u201cBecause of Trump\u2019s fanaticism, the worshipful base of the Republican  Party barely regards climate change as a serious problem. That\u2019s a  death warrant to the species.\u201d\u00a0\n\n\u201cThere are plenty of young people who are appalled by the behaviour  of the older generation, rightly, and are dedicated to trying to stop  this madness before it consumes us all. Well, that\u2019s the hope for the  future.\u201d\n\nMore here: [https://www.newstatesman.com/encounter/2022/04/noam-chomsky-were-approaching-the-most-dangerous-point-in-human-history](https://www.newstatesman.com/encounter/2022/04/noam-chomsky-were-approaching-the-most-dangerous-point-in-human-history)", "comment": "> There are plenty of young people who are appalled by the behaviour of the older generation\n\nThat could have been written in 1968 about the hippies (who are now the older generation).  Nothing new here.", "upvote_ratio": 310.0, "sub": "AskOldPeople"}363{"thread_id": "ukxtkg", "question": "\u201cThe first article that I wrote for the elementary school newspaper was  on the fall of Barcelona \\[in 1939\\],\u201d\n\n\u201cI haven\u2019t changed my opinion since, it\u2019s  just gotten worse,\u201d\n\n\u201cwe\u2019re approaching the  most dangerous point in human history\u2026 We are now facing the prospect of  destruction of organised human life on Earth.\u201d\n\n\u201cBecause of Trump\u2019s fanaticism, the worshipful base of the Republican  Party barely regards climate change as a serious problem. That\u2019s a  death warrant to the species.\u201d\u00a0\n\n\u201cThere are plenty of young people who are appalled by the behaviour  of the older generation, rightly, and are dedicated to trying to stop  this madness before it consumes us all. Well, that\u2019s the hope for the  future.\u201d\n\nMore here: [https://www.newstatesman.com/encounter/2022/04/noam-chomsky-were-approaching-the-most-dangerous-point-in-human-history](https://www.newstatesman.com/encounter/2022/04/noam-chomsky-were-approaching-the-most-dangerous-point-in-human-history)", "comment": "I mean yeah he\u2019s been saying this type shit  forever so is this new or something?", "upvote_ratio": 180.0, "sub": "AskOldPeople"}364{"thread_id": "ukxtkg", "question": "\u201cThe first article that I wrote for the elementary school newspaper was  on the fall of Barcelona \\[in 1939\\],\u201d\n\n\u201cI haven\u2019t changed my opinion since, it\u2019s  just gotten worse,\u201d\n\n\u201cwe\u2019re approaching the  most dangerous point in human history\u2026 We are now facing the prospect of  destruction of organised human life on Earth.\u201d\n\n\u201cBecause of Trump\u2019s fanaticism, the worshipful base of the Republican  Party barely regards climate change as a serious problem. That\u2019s a  death warrant to the species.\u201d\u00a0\n\n\u201cThere are plenty of young people who are appalled by the behaviour  of the older generation, rightly, and are dedicated to trying to stop  this madness before it consumes us all. Well, that\u2019s the hope for the  future.\u201d\n\nMore here: [https://www.newstatesman.com/encounter/2022/04/noam-chomsky-were-approaching-the-most-dangerous-point-in-human-history](https://www.newstatesman.com/encounter/2022/04/noam-chomsky-were-approaching-the-most-dangerous-point-in-human-history)", "comment": "i do not think humans are able to solve all the problems that do arise. \n\nAnd I do not think Chomsky is the one who knows the best answers.", "upvote_ratio": 130.0, "sub": "AskOldPeople"}365{"thread_id": "uky99r", "question": "I studied that in Linux, user level threads are mapped 1:1 to kernel level threads, and threads have the same type of PCB that we are for processes. About Windows, what's the difference with Linux? I studied that Windows threads are mapped m:n with pools of worker threads. So:\n\n* Are the created threads just shown in the system process table (the table that contains all the pid and the pointers to the relative PCB in memory) like all the processes, or they aren't? If not, where are they stored? How can the scheduler decide if they are not in the system process table?\n* Since when I start a simple process, it is itself a thread (I can check it via ps command, and on Windows it should be the same), what's the difference between them? Is there a difference on how the system (Linux or Windows) *see* them? Or are they the same thing but the the \"non-main\" threads(the ones created within the process) share the same virtual address space with the main-thread(the process that created them)?\n* How are threads told to access only certain things, if they have the same \"block map table\" in the PCB since they have the same virtual address space (and thus could in theory access everything)? Who sets and sees the constraints? Where are these constraints written?\n* Does pthread library simply provides API that will create a kernel level thread starting from a user level thread(so 1:1 mapping), setting the relative priority(I can do it via pthread, but I don't know how this scheduling priority is handled) of the kernel level thread that will be seen by the kernel in scheduling act? Or maybe EVERY time the kernel level thread corresponding to one of my user level threads is scheduled, pthread MUST act as middleman and then there is this forced \"bridge\" and this overhead maybe because pthread library can manage scheduling things (again like I said before, when I start a thread with pthread, I can set some scheduling priority in my threads) so maybe it can *dynamically* choose which of its (pthread's) user level thread to run, when any of the kernel level thread of its (pthread's) is scheduled?", "comment": "I don't know the details of how it works in Windows, but on Linux:\n\nBecause of the way threads were \"retrofitted\" onto the Linux kernel after it was originally designed, there's a bit of a mismatch in terminology between the way user-space tools talk about threads and the kernel's view. From the kernel's perspective, each thread has its own thread ID (TID), and also a TGID (thread group ID). For a single-threaded program, the TID and TGID are the same; for a multithreaded program, each thread has its own TID, and each thread's TGID is set to the TID of the main thread.\n\nFrom the perspective of userspace tools like `ps` and system calls like `getpid`, when they refer to a PID, they're usually actually talking about a TGID. For clarity, I'll use the kernel's terminology in the rest of this comment.\n\n> Are the created threads just shown in the system process table (the table that contains all the pid and the pointers to the relative PCB in memory) like all the processes, or they aren't?\n\nYes, from the scheduler's perspective, threads are just processes that happen to have the same TGID.\n\n> Is there a difference on how the system (Linux or Windows) see them?\n\nDepends on the context. In some cases, threads are independent; for instance, when the scheduler is choosing a thread to run, it doesn't need to care if it's a single-threaded process, or one thread among many with the same TGID.\n\nBut in other contexts, threads are treated as a group. As you mentioned, they share an address space, so that e.g. calling `mmap` in one thread is visible to the others. They also share a single file descriptor, and if one thread performs an action that would terminate the \"process\" (e.g. calling `exit`, `execve`, or receiving an unhandled signal) then all other threads are terminated as well.\n\n> How are threads told to access only certain things, if they have the same \"block map table\" in the PCB since they have the same virtual address space (and thus could in theory access everything)? Who sets and sees the constraints? \n\nFrom the kernel's perspective, there are no \"constraints\". Threads share the same virtual address space, so in principle nothing stops them from clobbering each other's memory.\n\nWithin a program, you can \"tell\" a thread to only access certain things in the same way you would \"tell\" a function what to do: by passing it arguments. Each thread has its own stack pointer register, so when you create a new thread you also allocate a region of memory to serve as its stack. And you can push arguments onto that stack, which the thread's main function will be able to access just as if it were called within the same thread.\n\nOnce the threads are running, they can also access each others' memory or global shared objects via pointers. Obviously, this has to be done very carefully if you don't want to end up with race conditions or other bugs.\n\n> Or maybe EVERY time the kernel level thread corresponding to one of my user level threads is scheduled, pthread MUST act as middleman \n\nNo, the pthread library doesn't do its own scheduling. Each user-level thread is its own kernel thread, and the kernel is responsible for scheduling them.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}366{"thread_id": "ukynrg", "question": "I've read IMMUNE from Kurzgesagt, and now I'm watching Breaking Bad. So I want to know how cancer can spread into your lymph node. Thanks!!", "comment": "The \u201chow\u201d is cancer is cells that have broken outside the control of the cell cycle, they have signals to make them grow/proliferate turned on and signals to stop growth turned off. Under ordinary circumstances cells from one part of your body would die in another part, but cancer cells can adapt to new conditions because they have turned off the things that would stop them. \n\nAs for the \u201cwhy\u201d lymph nodes you have to understand one of the jobs of the lymphatic system is to collect fluid/debris that have leaked into tissues, \u201cfilter\u201d it at the lymph nodes and release it back into the subclavian vein for recirculation. As cancer cells metastasize out from the tumor they can often end up in this \u201cdrainage system\u201d only unlike most pathogens they are your cells so the immune system doesn\u2019t \n destroy them as readily (although it can destroy them). From there the cancer will continue branching out and metastasizing until you get noticeable symptoms and go to the doctor.", "upvote_ratio": 150.0, "sub": "AskScience"}367{"thread_id": "ukzc2c", "question": "If in some species males also can be pregnant then what tell scientists that this one should be called male and other one female?", "comment": "Whichever one makes the bigger gamete (sex cell) is the female. Easy example is egg (big) vs sperm (small), but it's not always so clear. As you point out, it doesn't always correlate with pregnancy or dedication to the young.", "upvote_ratio": 230.0, "sub": "AskScience"}368{"thread_id": "ukzfir", "question": "I've recently reading about new advances in rocket propulsion technology. Leaving aside other considerations like ionizability, chemical stability, etc., why does either propulsion system prefer the \"opposite\" extreme of propellant molecular weight? From what I gather online, ion engines tend towards xenon, while the proposed nuclear thermal rockets in development generally adopt hydrogen. \n\nAm an engineer myself, so feel free to explain in depth. Thanks!", "comment": "The short answer is that lower molecular weight result in higher Isp but lower thrust. For ion engines you can easily get too much Isp and too little thrust.\n\nI am going to assume you know what specific impulse means (Isp). Let me know if it's not the case.\n\nIn a rocket engine the power in the jet is something like:\n\n    P = n * 1/2*m_dot*V^2\n\nwith n the efficiency of the engine, m\\_dot the propellant mass flow rate and V the exhaust velocity.\n\nYou can also rewrite this as\n\n    P= 1/2*T*Isp/g\n\nwith `T` being the thrust (`=m_dot*V` from momentum), `Isp` the specific impulse and `g` gravitational acceleration on Earth (`Isp=V*g` from the definition). So for a fixed power (which is usually what you have) you get to trade between the thrust you get and how efficient you are with your propellant.\n\nIn most rocket engines you want to maximize your Isp to get the most efficient use of your propellant. You can rewrite the Isp as follow by introducing `M` the molar mass, `q_dot` the molar flux (mol/s) and `E` the energy per mol of propellant.\n\n    P = 1/2 *M *q_dot * Isp^2 *g^2\n    E = 1/2 *M * Isp^2 *g^2\n    Isp= 1/g * sqrt(2*E/(M))\n\nFor thermal rockets (chemical or nuclear) the energy per mol is going to be limited by the temperature of your hot source. For an ideal gas you get the famous `E~3/2*k_b*T` and it's more or less always proportional to the temperature.\n\nSo if you want to increase your Isp you either increase the temperature or decrease the molecular weight `M`. Even you take very low molecular weight propellant like hydrogen and the highest melting point materials (\\~2500K) you still end up with a max Isp in the order of 1000 to 2000s before the nuclear fuel starts to become too fragile and melt.\n\nFor electrostatic ion thrusters the energy in each particles is just the potential energy from the voltage difference `V` between electrodes. So\n\n    E= e*V*N_A\n\nAssuming that each particles as a single elementary charge `e`. So you end up with\n\n    Isp= 1/g * sqrt(2*e*V*N_A/M)\n\nSo in this you have two things you can tweak, the acceleration voltage `V` and the molecular weight. At a fixed voltage going from Xenon (131.29 AMU) to hydrogen (1 AMU) would let you increase your Isp by a factor 11. That sounds amazing in principle. You would need so much less propellant! But if you look at the 2nd equation in the post you also end up having to either increase your power by 11 (which means a lot of mass) or decrease your thrust by that much. The issue is that the less thrust you get the more time if take to get to destination and you also have to use less optimal thrust windows.\n\nPlugging rough numbers: For a lot of reasons, some of them related to plasma stability and general efficiency you usually need the acceleration potential 200V or above. So your Isp end up with something in the order of 2000s for xenon. The system efficiency is around 50% so you end up with about 50 to 60 mN/kW. The big geostationary spacecraft have something like 15 to 20kW of solar panel installed and still take 4 months to get from GTO to GEO orbit. To give you an idea that is equivalent to 0 to 100km/h in about 3 days.\n\nOf course you can increase the size of the panels, but that adds mass and you end up with less mass available for your payload. Turns out that the sweet spot for most mission in terms of transit time and payload mass is for Isp around 1500 to 3000s.\n\nYou can actually write a modified \"rocket equation\" that includes mass of your power supply and `C` weight to power ratio of your power system. [It looks something like this](https://i.imgur.com/VoBgN2F.png). `V_e` is the exhaust velocity (`Isp*g`) and delta-T the transfer time.\n\nIf we found ways to make drastically lighter power source the balance would change and higher Isp would be interesting. In that case we could choose to go with lighter propellants. In theory there is nothing stopping use from making ion engines with Isp of 10,000 to 20,000s but they would have too low of a thrust to be really useful for much.", "upvote_ratio": 790.0, "sub": "AskScience"}369{"thread_id": "ul019c", "question": "There was a problem in which we were asked to compute the throughput of various window sizes. I noticed that, as we increase the window size, we get better throughput (because we have less and less idle time). My question is, then why can't we have an arbitrarily large window size? What is the disadvantage?\n\nThe question I'm referring to is this:\n\n>Consider an error-free 64-kbps satellite channel used to send 512-byte  \ndata frames in one direction, with very short acknowledgments coming  \nback the other way.  \nWe know that the round trip time from earth to satellite is 540 msec.  \nFind the throughput for window sizes 1, 7, 15, and 127.  \n(Assume the processing time at the receiver side can be neglected.)", "comment": "A larger window size requires more memory on both participants in the connection, and implies a longer delay before the application sees any data.\n\nThe memory is self explanatory. If we blow the window size up to something preposterous like 1 GB, both participants need to store the last gigabyte of packets they\u2019ve sent, so if they get a re-send request they\u2019ll have that data cached and ready to go.\n\nSimilarly, if the window is 1 GB then we may wait to receive an entire gigabyte of packets before letting the other end know \u201chey we missed one\u201d, receiving the missing packet and re-ordering our buffer, and then delivering to the application. The network throughput is technically quite high, but the data observed by the application is extremely bursty.", "upvote_ratio": 80.0, "sub": "AskComputerScience"}370{"thread_id": "ul0bah", "question": "How do you view a 25 year old?", "comment": "Depends on their personality and interactions with society....that should be how a person is viewed....being a good human or a raging ass has no age limits or age ranges", "upvote_ratio": 170.0, "sub": "AskOldPeople"}371{"thread_id": "ul0bah", "question": "How do you view a 25 year old?", "comment": "[deleted]", "upvote_ratio": 120.0, "sub": "AskOldPeople"}372{"thread_id": "ul0bah", "question": "How do you view a 25 year old?", "comment": "Binoculars?", "upvote_ratio": 80.0, "sub": "AskOldPeople"}373{"thread_id": "ul3x3m", "question": "the title. I want to design a messaging system where the server rejects messages unless they are encrypted. but if they are, then the server passes the message to the client who then decrypts it privately.\n\nI'm pretty sure I remember reading that real cipher text should not be distinguishable from random data. But it wouldnt hurt to ask, perhaps someone has developed something like this recently, where a data payload is \"signed\" but instead of from a sender its signed as proof it is indeed encrypted if you knew the key. TIA", "comment": "Do you want to prove to the server that the sender knows a key and plaintext that encrypt into the ciphertext they have in front of them, or would it be enough for the sender to just tell the server \"I want to send this on to the recipient, and here's a piece of evidence you can use to prove to the recipient that I'm really the one who sent this thing in case the recipient complains you forwarded them garbage.\"", "upvote_ratio": 60.0, "sub": "AskComputerScience"}374{"thread_id": "ul525j", "question": "I took a Java beginners course my last semester, and have decided to major in computer science. But I felt so behind because I did not have any prior experience with programming. So I wanted to learn some Java over the summer break and familiarize myself. What website would you recommend for someone like me?", "comment": "Hackerrank.com is great for learning Java, as well as general problem solving, algorithms, and data structures in many different languages.\n\nIn general, what you are looking for are code challenges or coding competition websites. I think the UVA online judge is still online. One of the benefits of practicing your coding with these is that companies base their tech interview questions on these problems almost all the time. For better or worse, this will help you with half of your code interview.", "upvote_ratio": 60.0, "sub": "AskComputerScience"}375{"thread_id": "ul525j", "question": "I took a Java beginners course my last semester, and have decided to major in computer science. But I felt so behind because I did not have any prior experience with programming. So I wanted to learn some Java over the summer break and familiarize myself. What website would you recommend for someone like me?", "comment": "https://java-programming.mooc.fi/\n\nThis is often brought up as one of the best online courses for Java. It's free, through the University of Helsinki. I finished both of their Java courses and I found them pretty helpful, covering basic to advance topics, with good explanations and a ton of programming challenges.", "upvote_ratio": 40.0, "sub": "AskComputerScience"}376{"thread_id": "ul525j", "question": "I took a Java beginners course my last semester, and have decided to major in computer science. But I felt so behind because I did not have any prior experience with programming. So I wanted to learn some Java over the summer break and familiarize myself. What website would you recommend for someone like me?", "comment": "[codingbat.com](https://codingbat.com) has slowly graduated. Java exercises for beginners, I think it's a great place to start/refresh basic programming skills. Then move on to something more project based.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}377{"thread_id": "ul66lu", "question": "Does this mean that \u03c0 is Turing complete?\n\nIf you picked the correct spot to start reading the \"tape\", \u03c0 may be functional code.\n\nIs the answer only \"no\" until that spot is found?", "comment": "It's actually a common misconception that pi contains all possible strings of numbers 0-9. Some people suspect it, but this property hasn't been proven. You can read [this](https://math.stackexchange.com/questions/216343/does-pi-contain-all-possible-number-combinations) for more information.\n\nEven if it were true, you couldn't consider pi itself Turing complete, it would just be a storage device. In other words, it could be used as tape that a Turing machine could use, but that wouldn't make it the Turing machine or Turing complete in itself.", "upvote_ratio": 390.0, "sub": "AskComputerScience"}378{"thread_id": "ul66lu", "question": "Does this mean that \u03c0 is Turing complete?\n\nIf you picked the correct spot to start reading the \"tape\", \u03c0 may be functional code.\n\nIs the answer only \"no\" until that spot is found?", "comment": "Pi (at some offset and numerical base) would be an input for some kind of computing device. i.e. you'd have to apply some model of computation to the data.\n\nPi itself is just data.", "upvote_ratio": 60.0, "sub": "AskComputerScience"}379{"thread_id": "ul6okz", "question": "What were your thoughts?", "comment": "It seemed like such a huge deal at the time. Ken Starr. Republicans losing their minds. The moral outrage!!! I was a Republican at the time, didn\u2019t like the Clintons, and couldn\u2019t have cared less about it. \n\nNow? Well, now we have a sitting representative who trafficked minors, paid them by Venmo, and had his partner in the deal flip on him\u2026and he still has his parking spot and no one seems to be doing anything about it.", "upvote_ratio": 1890.0, "sub": "AskOldPeople"}380{"thread_id": "ul6okz", "question": "What were your thoughts?", "comment": "i remember.  i hated the hate that lewinsky dealt with.", "upvote_ratio": 1480.0, "sub": "AskOldPeople"}381{"thread_id": "ul6okz", "question": "What were your thoughts?", "comment": "Consensual sex between 2 adults, not that big a deal. Cheating on your wife with someone half your age, amoral. Lying about it under oath, criminal.\n\nBut we know JFK screwed anything that moved, and other presidents have had affairs (FDR, LBJ). So why it became a big concern with Clinton one can only speculate.\n\nMy parents were lifelong die hard Republicans and the Clinton scandal turned them into Democrats. They thought it was disgusting that the president's sex life was being aired in public and that the Republicans should mind their own business and be less sex obsessed.", "upvote_ratio": 1120.0, "sub": "AskOldPeople"}382{"thread_id": "ul6xki", "question": "As title. Both have the function of waiting for an async function to complete.\n\nAdditionally why can\u2019t I run an async function with an await from a synchronous function? What could go wrong if that was allowed?", "comment": "Well, there is a bit of confusion about what an async function does, so lets start from the problem it solves. Imagine that you are writing a piece of software that needs to listen for incoming connections, so what you do is you call `.listen` and wait, this is called blocking behaviour, but what if you wanted to do other things while you wait? Well, you could use threads, but what if you didn't want to?\n\nWhat if we had a function, that when it needs to wait it just returns to the caller, lets you do something else, notifies you when it has finished waiting, and automatically resumes back where it left off? That's exactly what `Future` is, which is a generalization of an async function (async fn **are** `Future`'s).\n\nSo what is `await` doing? Well it's a way of saying \"pass the wait along\". It doesn't block, it just \"propagates the wait\", so you can still do other things.\n\nWhat about `block_on`? `block_on` is different because it doesn't \"propagate the wait\" it just block until the future is finished, it doesn't return to the caller of the future. It doesn't allow you to do other things, it waits until the future has finished.\n\nSo the main difference between `await` and `block_on` is how the handle a future which needs to wait. `await` passes the wait along, allowing you to return and do other stuff, but only works in async contexts, while `block_on` actually blocks until the future has finished, and while you could use it in an async context, it's a **terrible** idea (`Future`'s **must** not block).\n\nAnd finally, nothing could go wrong if you run async functions in sync ones, it's just not possible. The problem is that async is not magic, it needs a bunch of logic to control which futures are ready, which are waiting, and in general a whole lot of keeping track of things. That's not something you want to keep around even if you are not using it. So in order to use that extra stuff you need to create a special thing called a runtime, which does the book keeping. In a sense, `block_on` is a runtime, it only allows one future and runs on the current thread, blocking until it has finished, but it's still a runtime.", "upvote_ratio": 200.0, "sub": "LearnRust"}383{"thread_id": "ul6xki", "question": "As title. Both have the function of waiting for an async function to complete.\n\nAdditionally why can\u2019t I run an async function with an await from a synchronous function? What could go wrong if that was allowed?", "comment": "Look into how the `Future` trait works, the base idea is rather simple.\n\nOmitting all detais `async` blocks are just futures that the compiler generates for you.\n\nYou can think of it roughly something like this:\n\n```\nasync {\n  foo_future.await;\n  1_usize\n}\n```\n\nturns into something like:\n\n```\nimpl Future for SomeGeneratedType {\n  type Output = usize;\n  fn poll(self: ...) -> Poll<...> {\n    match self.foo_future.poll(...) {\n      Poll::Ready(_) => {},\n      Poll::Pending => return Poll::Pending\n    };\n    Poll::Ready(1_usize)\n  }\n}\n```\n\nThis transformation does not make a lot of sense outside futures, what would the compiler generate for `.await` in a function?\n\n`block_on` is _simply_ a function that repeatedly calls (again, omitting details) `poll` of the given future and returns the result whenever it returns `Poll::Ready`.", "upvote_ratio": 30.0, "sub": "LearnRust"}384{"thread_id": "ul8bzb", "question": "I've heard that Dazed and Confused (released in 1993) depicts the late '70s really well. Any other movies that came out years after the era they depict that represent that era very accurately?", "comment": "I love coming of age-type era movies. I just watched Summer days, summer nights (2018) playing in 1982. Music, cloths, cars all from the \"groovy\" 80s. It really was a bit of a blast of the past.\n\nI think there are a few more like that but American Graffiti (1973) playing in 1962 is the original for me and my all-time favorite!\n\n​\n\nEDIT Just added \"Not Fade Away\" (2012) \"Set in suburban New Jersey the 1960s, a group of friends form a rock band and try to make it big in this music-driven coming of age story.\" The period details are spot-on and the soundtrack is great.", "upvote_ratio": 110.0, "sub": "AskOldPeople"}385{"thread_id": "ul8bzb", "question": "I've heard that Dazed and Confused (released in 1993) depicts the late '70s really well. Any other movies that came out years after the era they depict that represent that era very accurately?", "comment": "Boogie Nights", "upvote_ratio": 60.0, "sub": "AskOldPeople"}386{"thread_id": "ul8bzb", "question": "I've heard that Dazed and Confused (released in 1993) depicts the late '70s really well. Any other movies that came out years after the era they depict that represent that era very accurately?", "comment": "Not a movie but Stranger Things was right on with most things. I was a kid around the age of the characters at that time and all the cars and furnishings and stuff are spot on. Except for a very noticeable inappropriate power strip that showed up in a shed, I think it was in Season 2. Very off-putting. Otherwise the props people and set dressers did a great job.\n\nIn fact I got so obsessed with that inappropriate power strip that a friend who works in props helped me trace it to a model that would have first been sold in the 1990s. I think it only really bothered me because the show was so good otherwise (in the period appropriateness).", "upvote_ratio": 50.0, "sub": "AskOldPeople"}387{"thread_id": "ul8g9w", "question": "That movie makes 1970s New York seem like a dystopian hell. Was New York as bad as that movie makes it seem like?", "comment": "Absolutely depended on the neighborhood street.\n\nNeighborhoods that were stable and had either homeowners or people in rent-controlled apartments tended to stay long term, cared about their street and kept an eye out for others. But this was literally street by street.  It wasn't an area that was good or bad.  It was a single block on a single street.\n\nNeighborhoods with apartment complexes that cycled people through constantly, were half empty, or had drugs/prostitution going on were completely shady. Needles.  Condoms. Ick.\n\nTimes Square was awful.  As teens, we were always in a pack.  I never walked alone in that area at night.\n\nIn the 80s, the gentrification started.  Yuppies moved in, took over lofts and the run down buildings.  The City hopped on the gentrification train in the 90s.  \n\nNYC became much more aware of tourism dollars.  But if you watch NYC news, it's still bad at night, especially in some areas. There was just a murder in Times Square a couple days ago.", "upvote_ratio": 1040.0, "sub": "AskOldPeople"}388{"thread_id": "ul8g9w", "question": "That movie makes 1970s New York seem like a dystopian hell. Was New York as bad as that movie makes it seem like?", "comment": "NYC almost declared bankruptcy in 1975. The state took control of the city\u2019s finances and made drastic cuts in municipal services and spending, cut city employment, froze salaries and raised bus and subway fares. \n\nThe New York City blackout of 1977 struck on July 13 of that year and lasted for 25 hours, during which black and Hispanic neighborhoods fell prey to destruction and looting. By the end of the 1970s, nearly a million people had left NYC, a population loss that would not be made up for another twenty years.\n\nThat said, there were still nice neighborhoods in NYC, just not as many of them. Crime movies focused on the worst neighborhoods, but comedies and romances focused on the nicer neighborhood. \n\nThe TV show *All in the Family* was set in a middle class neighborhood in Queens. The spin off *The Jeffersons* was set in an upper class neighborhood on the East Side. The Woody Allen movies *Annie Hall* and *Manhattan* made NYC look great. \n\nSo it was not all bad. But it was pretty bad, especially compared to today.", "upvote_ratio": 600.0, "sub": "AskOldPeople"}389{"thread_id": "ul8g9w", "question": "That movie makes 1970s New York seem like a dystopian hell. Was New York as bad as that movie makes it seem like?", "comment": "To me, yes. I was born and raised in Manhattan in a not-great neighborhood. I left in 1972 and felt reborn. Frequent visits home during the 70s reinforced this feeling. Dystopian hell is exactly what it felt like.\n\nOn the other hand, my family and oldest friends did not feel the same way I did. They stayed and continued to love it. My mother lived there her entire life and would not have lived anywhere else. \n\nIn the late 80s and 90s my family moved to much nicer neighborhoods than the one I grew up in, the city got safer and cleaner and I started to enjoy visiting a lot.", "upvote_ratio": 460.0, "sub": "AskOldPeople"}390{"thread_id": "ul92gk", "question": "How did your parents react to the music?", "comment": "My dad\u2019s priest counseled him to talk to me about my heavy metal problem. Mid-1980s, loads of devil imagery. I\u2019d moved on to punk and we laughed over some of the album covers. The priest was later accused of molesting altar boys and I still like metal.", "upvote_ratio": 210.0, "sub": "AskOldPeople"}391{"thread_id": "ul92gk", "question": "How did your parents react to the music?", "comment": "Metal....hair metal, glam metal, hard metal, punk...geezus I had a lot of fun. Anyway, my mother hated it ALL. She thought I was going to end up like Nancy Spungen. The day Sid Vicious died, I was coming in the door from school and she said \"that asshole from that band you like so much is dead.\" She thought the New York Dolls were all (non pc term redacted); The Ramones were dirty bums; Marc Bolan was a \"sissy\"; and Steven Tyler was a \"screaming lunatic\"....Happy Mother's Day ma...RIP.", "upvote_ratio": 120.0, "sub": "AskOldPeople"}392{"thread_id": "ul92gk", "question": "How did your parents react to the music?", "comment": "My parents were born in the early 1920s. When rock was new, I was a small child. However, I suspect my parents weren't big fans of Elvis, Chuck Berry or Little Richard. Mom loved Sinatra, Perry Como, Patty Page, etc. Dad loved Hank Williams, Ernest Tubb, Lefty Frizzell, etc.\n\nI guess I would call Led Zeppelin one of the first bands that could be referred to as metal. Mom and dad didn't like them either.", "upvote_ratio": 80.0, "sub": "AskOldPeople"}393{"thread_id": "ula8he", "question": "Thirty Seconds Over Winterland and Bless Its Pointed Little Head (Jefferson Airplane) come to mind.  Coincidentally both are live albums.", "comment": "[Weasels Ripped My Flesh](https://en.m.wikipedia.org/wiki/Weasels_Ripped_My_Flesh)", "upvote_ratio": 140.0, "sub": "AskOldPeople"}394{"thread_id": "ula8he", "question": "Thirty Seconds Over Winterland and Bless Its Pointed Little Head (Jefferson Airplane) come to mind.  Coincidentally both are live albums.", "comment": "You Can Tune a Piano But You Can't Tuna Fish by REO Speedwagon.", "upvote_ratio": 90.0, "sub": "AskOldPeople"}395{"thread_id": "ula8he", "question": "Thirty Seconds Over Winterland and Bless Its Pointed Little Head (Jefferson Airplane) come to mind.  Coincidentally both are live albums.", "comment": "nothing implied about the actual music, but here are some titles that i like:\n\n\\- the smoker you drink, the player you get - joe walsh\n\n\\- sunday morning coming down - kristofferson?  cash?\n\n\\- dancing in the dragon's jaws, bruce cockburn", "upvote_ratio": 50.0, "sub": "AskOldPeople"}396{"thread_id": "ulbj4n", "question": "What is a strong belief that has been consistent throughout your life?", "comment": "That animals deserve our kindness and compassion.", "upvote_ratio": 350.0, "sub": "AskOldPeople"}397{"thread_id": "ulbj4n", "question": "What is a strong belief that has been consistent throughout your life?", "comment": "That I don\u2019t want children.", "upvote_ratio": 310.0, "sub": "AskOldPeople"}398{"thread_id": "ulbj4n", "question": "What is a strong belief that has been consistent throughout your life?", "comment": "Religion does more harm than good.", "upvote_ratio": 280.0, "sub": "AskOldPeople"}399{"thread_id": "ulcg1r", "question": "What was the harshest you punished your kids and why?", "comment": "I sent them to bed without dinner once. I swear the way they were crying you would think I was killing them.  \n\n After about an hour I sent my husband in with sandwiches for them. \n\n  We were at a family members house and they would not stop fighting, constant bickering and I had it up to my chin.  I told them, if they did not get along or at least separate into different places, they would be sent to their rooms with no dinner.  \n\n They did not learn their lesson I just learned different ways to handle three young mischievous children. Like, not taking them places that are so boring that they have nothing better to do than fight.   I don't care what my mother said, small kids are not built for being still for very long.", "upvote_ratio": 70.0, "sub": "AskOldPeople"}400{"thread_id": "ulcg1r", "question": "What was the harshest you punished your kids and why?", "comment": "had a bad habit of screwing around in the morning getting ready for school making her mom late for work way to often.  Mom was a pushover.  The delay was often debates about what to wear and getting dressed. \n\n3nd grade. \n\nI took a morning off work and decided i was fixing this.   She fucked around and found out.   \n\nI took her to wal mart and got her 3 kids golf shirts (red) and three khaki shorts that day.   she wore her \"uniform\" the next 4 months.  Her school didnt have uniforms.  She did. \n\nShe hated it for a week then started to like it once she figured out nobody cared and mornings went much better.", "upvote_ratio": 60.0, "sub": "AskOldPeople"}401{"thread_id": "ulcg1r", "question": "What was the harshest you punished your kids and why?", "comment": "I spanked my 3 yo son for running out in the street between two parked cars. Only spanking he ever got. Never forgot the lesson either.", "upvote_ratio": 40.0, "sub": "AskOldPeople"}402{"thread_id": "uldard", "question": "Where was the Hawaiian islands/hotspot located in the Mesozoic?  I believe that the current islands didn\u2019t exist until the Cenozoic, and that the oldest of the Emperor Seamounts existed during the Cretaceous period, but I have no idea where the hotspot was located or when it was created.\n\nAlso, I\u2019m wondering what climate the islands were.", "comment": "Generally, when [mantle plumes](https://en.wikipedia.org/wiki/Mantle_plume) (hotspots) first reach the surface, the arrival of the plume head is accompanied by the formation of a [large igneous province](https://en.wikipedia.org/wiki/Large_igneous_province) or LIP. When a LIP erupts through oceanic lithosphere, it typically produces an [oceanic plateau](https://en.wikipedia.org/wiki/Oceanic_plateau), whereas when it erupts through continental lithosphere, it can produce continental flood basalts, like the [Deccan Traps](https://en.wikipedia.org/wiki/Deccan_Traps) or the [Columbia River Basalts](https://en.wikipedia.org/wiki/Columbia_River_Basalt_Group). For some plumes, we can trace them back along the characteristic \"hotspot track\" to where the plume first erupted, this is the case for both the [Reunion Hotspot](https://en.wikipedia.org/wiki/R%C3%A9union_hotspot) and [Yellowstone Hotspot](https://en.wikipedia.org/wiki/Yellowstone_hotspot), where the Deccan Traps and Columbia River Basalts represent the LIPs associated with the initial arrival of the plume head at the surface and there are \"tracks\" of volcanism between these LIPs and the modern plume location. In the case of the [Hawaii-Emperor](https://en.wikipedia.org/wiki/Hawaiian%E2%80%93Emperor_seamount_chain) chain and associated hotpsot, if we follow the track back, we don't find a LIP, but instead find that the chain terminates into the corner between the Kamchatka and Aleutian subduction zones. This implies that the LIP that would mark the initiation of the Hawaii-Emperor seamount chain was subducted. The oldest remaining portions of the chain (that are about to enter the Kamchatka trench) are ~81 million years old (so not that far back into the [Mesozoic](https://en.wikipedia.org/wiki/Mesozoic). The best constraint we have on how much of the chain we've lost to subduction and when the plume initiated comes from mantle tomography, where we use changes in the speed of seismic waves from earthquakes as they pass through material of different densities/temperatures to produce \"images\" of the mantle, kind of like a giant ultrasound. Specifically, [Wei et al., 2020](https://www.science.org/doi/full/10.1126/science.abd0312) used mantle tomography to potentially identify the subducted oceanic plateau that would mark the arrival of the Hawaii-Emperor plume head at the surface. From this, they back out that the oceanic plateau was probably subducted beneath Kamchatka about 20-30 million years ago and that the plateau itself formed 100 million years ago on the Pacific plate (so again, not terribly far back into the Mesozoic all things considered). \n\nAs to where this oceanic plateau was located when it formed, largely in the same location as the modern plume is today in terms of latitude-longitude / distance from the poles. In general, hotspots are approximately fixed with respect to the rotational axes of the Earth (in detail, they're not truly fixed and they do \"drift\" a bit, e.g., see this [FAQ](https://www.reddit.com/r/askscience/wiki/planetary_sciences/hawaii_seamount_bend) entry considering how drift of Hawaii-Emperor seamount plume may factor into the prominent bend in the chain, but for our purposes, we can consider them close enough to being fixed to say that the plume was basically in the same place when it formed as today). The plates have moved with respect to this (and other) hotspots since their formation, so in the simplest sense, hotspot tracks mostly reflect plate motion, not motion of the hotspot (kind of like moving a piece of paper above the tip of a candle, burning a track into it). Thus, if we could go back in time to 100 Ma to watch the formation of the Hawaii-Emperor oceanic plateau (that's now hanging out at about ~850 km down in the mantle underneath Kamchatka), it would be at the approximately the same latitude and longitude as the modern big island of Hawaii, at least likely within a few degrees. If we could stay hovering above this exact spot for the next 100 million years, we would watch motion of the Pacific plate advect older seamounts and volcanoes away from the plume location and toward the Kamchatka trench, until the plateau and additional portions of the seamount chain started to be subducted.", "upvote_ratio": 6230.0, "sub": "AskScience"}403{"thread_id": "ulga33", "question": "My parents bought me the new M1 air (16RAM/512GB). Could it handle projects (like UNITY) and some 3D rendering. Maybe some video and music editing too. I'm currently a freshman.", "comment": "No, you\u2019ll spill some soda innit or have it stolen from your backpack while in the library.", "upvote_ratio": 220.0, "sub": "AskComputerScience"}404{"thread_id": "ulga33", "question": "My parents bought me the new M1 air (16RAM/512GB). Could it handle projects (like UNITY) and some 3D rendering. Maybe some video and music editing too. I'm currently a freshman.", "comment": "Not really the right subreddit, but almost certainly. 16Gb of RAM might be a little limiting towards the end of your schooling but generally you should be able to get 5-6 years out of it.", "upvote_ratio": 40.0, "sub": "AskComputerScience"}405{"thread_id": "uljuvj", "question": "How does our heart produce its electric current?", "comment": "Via the [sinus node](https://en.m.wikipedia.org/wiki/Sinoatrial_node) but the rate is controlled via the [medulla](https://en.m.wikipedia.org/wiki/Heart_rate).\n\nInteresting side note, the \"heartbeat\" in the 6-week abortion heartbeat bill is actually the embryonic SA node producing an electric pulse. The proper heart isn't fully formed until 10-12 weeks, doesn't start relieving placental circulatory resistance until 16 weeks and is difficult to monitor for developmental issues until around 20 weeks.", "upvote_ratio": 250.0, "sub": "AskScience"}406{"thread_id": "uljuvj", "question": "How does our heart produce its electric current?", "comment": "There are a series of active pumps, the most important one being the Na-K-ATPase pump as well as a series of ion channels. The electricity is caused by flow of ions through the various channels which can fluctuate between open and closed states.", "upvote_ratio": 170.0, "sub": "AskScience"}407{"thread_id": "uljuvj", "question": "How does our heart produce its electric current?", "comment": "The cells that make up the sinoatrial node are pretty cool. They have channels that produce what is called the \"Funny Current\" which was named that because researchers observing it could not figure out what it was at first and its behavior was pretty odd (or \"funny\"). \n\nCells use the gradients of ions (Calcium, Sodium, Potassium, Chloride) across their membranes to generate currents, and trigger action potentials. In the case of the Sinoatrial (SA) node which controls the initiation of the heartbeat, the cycle of the action potential is an increase in cytoplasmic calcium that reaches a threshold, and triggers an action potential, this then triggers voltage gated potassium channels to bring the potential back down (hyperpolarize). Normally that cycle is the end of the story until some external stimuli triggers another action potential. \n\nIn the SA node however, there is the funny current. HCN ion channels responsible for creating the funny current, will spontaneously open when the cell gets hyperpolarized by the potassium currents, and allow for sodium to flow into the cell. This depolarized the cells enough to trigger the calcium channels which initiate the next action potential.", "upvote_ratio": 80.0, "sub": "AskScience"}408{"thread_id": "uljygg", "question": "Do our bodies have defences against prions?", "comment": "TL:DR Prions are a normal part healthy cells. They are not something the body needs to protect against, in most cases. Prions,  in very rare cases (very rare) ,  can become misshapen and cause problems. \n\nPrion diseases, also known as transmissible spongiform encephalopathies or TSEs, are a group of rare, fatal brain diseases that affect animals and humans.\u00a0 They are caused by an infectious agent known as a prion, which is derived from a misfolded version of a normal host protein known as prion protein. Prion diseases include bovine spongiform encephalopathy (BSE or \"mad cow\" disease) in cattle, Creutzfeldt-Jakob disease (CJD) and variant CJD\u00a0in humans, scrapie in sheep, and chronic wasting disease (CWD)\u00a0in deer, elk, moose and reindeer.\u00a0\n\nPrion diseases are associated with the prion protein, which is found in many body tissues, including the brain. Normally, prion protein does not cause disease and resides on the surface of many cell types. Though under investigation, scientists think normal prion protein might help protect the brain from damage. They do know that when many normal prion protein molecules change their shape and clump together, they can aggregate in brain tissue and form the infectious prions that cause prion disease. Prion diseases are therefore caused by an infectious, abnormally shaped and aggregated prion protein. Scientists are not sure why normal prion protein become misshapen. NIAID scientists co-discovered the prion protein gene and were among the first to show that abnormal prion protein can change normal prion protein to the abnormal, infectious form. \n\nSource,  NIAID research, a part of the NIH", "upvote_ratio": 1120.0, "sub": "AskScience"}409{"thread_id": "uljygg", "question": "Do our bodies have defences against prions?", "comment": "Yes! Your body does have defenses against prions.\n\nBefore we get into it, we should define some terms since it can get confusing talking about prions, prion proteins, and prion diseases.\n\n[Prion](https://en.wikipedia.org/wiki/Prion)\\- a class of misfolded proteins that induce normally folded proteins to misfold. Importantly they are self-replicating (induce normal proteins and misfold) and are infectious (may be spread from one organism to another). As a class of proteins, the term prions refers to multiple proteins.\n\n[Prion protein](https://en.wikipedia.org/wiki/PRNP) (PrP) - a specific protein that may become a prion if it misfolds. PrP is the only known prion in humans and is the cause for Creutzfeldt Jakob disease (CJD, some variants known as Mad Cow Disease or transmissible spongiform encephalopathy). There are other proteins that are considered prions but most of the known ones are [yeast proteins](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2376760/).\n\nSo PrP is normally found in humans and has a role in normal cell function. But when it misfolds (either due to a genetic mutation or from being exposed to a misfolded PrP from another diseased individual) it can cause disease (CJD).\n\n**The cells' defense:**\n\nCells have an extensive system in place to protect against misfolded proteins. While not all misfolded proteins are prions, they do have a tendency to aggregate and cause dysfunction. This is evident from the multitude of protein aggregation disorders found in humans both in the brain (CJD, Alzheimer's, Parkinson's, Huntington's, ALS, etc) and in the rest of the body (amyloidosis, inclusion body myopathy, Paget's disease of the bone, etc).\n\nIf your cell detects an accumulation of misfolded proteins (prions or others), it activates the unfolded protein response (UPR). This is an intricate system designed with multiple layers designed to try and fix misfolded proteins, degrade them if they are unable to be fixed, or kill off the cell if its unable to degrade misfolded proteins. It's very complex so I'll briefly describe some steps here but I'll link an excellent review below that goes into the nitty gritty.\n\nEssentially, your cells detect misfolded proteins and upregulate chaperone proteins which help guide proteins to be properly folded. If these chaperones are unable to properly folded the misfolded proteins, the misfolded proteins will be tagged for degradation with ubiquitin (a small protein used for signaling). Generally this is done by the proteasome which cleaves proteins in small pieces which can be recycled. However, larger aggregates of misfolded proteins may be degraded via autophagy which engulfs the aggregate in a compartment and then dissolves it in acid (fusion with a lysosome). If there is sustained and continued stress that is unable to be resolved by chaperones, the proteasome, or autophagy, then the cell begins programmed cell death known as apoptosis. Eventually the cell will break down resident immune cells (generally macrophages but may be others) will come by and clean up the mess.\n\n**How prions evade this defense:**\n\nProteins misfold all the time during normal cell function. As with any manufacturing plant, there will be some defects in the products. The UPR is constantly at work in all your cells and does a great job at preventing accumulation of misfolded proteins. So how do prions or other proteins that aggregate in disease escape this mechanism? When these aggregation prone proteins misfold, they form ultra-stable conformations known as stacked beta sheets (though there are other conformations as well). These beta sheets are incredibly hydrophobic and are very resistant to degradation. So aggregation prone proteins will go from cell to cell inducing normally folded proteins to misfold, become ultra stable, and when the cell cannot degrade them, it will undergo apoptosis.\n\nIt's important to note that this is not a black and white scenario as your cells are able to clear prions but when they begin to build up over time it becomes unmanageable. This is, in part, why prion disease and nearly all neurodegenerative diseases occur in the elderly.\n\nEDIT: this series of events is also why terminally differentiated cells (cells unable to divide such as neurons, myocytes, and osteocytes) are particularly vulnerable to protein aggregation. Actively dividing cells can undergo asymmetric mitosis where one daughter cell gets the bulk of the aggregates and the other remains healthy. Thus making tissues with actively dividing cells more resilient to protein aggregation including prions.\n\n[Unfolded protein response overview](https://www.nature.com/articles/nrm3270)\n\n[Prion disease and the unfolded protein response](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2838391/)", "upvote_ratio": 300.0, "sub": "AskScience"}410{"thread_id": "uljygg", "question": "Do our bodies have defences against prions?", "comment": "Not really. Most prion diseases are caused by misfolding of a specific protein. In its normal form, it's called PrPc, and it's found on the surface of healthy, normal neurons in the brain and spinal cord. As of now, we're not specifically sure what it does.\n\nWhat's interesting about PrPc is that it has a tendency to misfold into a form we call PrPsc. Simplified, the bad form (PrPsc) bumps into the good form (PrPc) and unfolds it using hydrogen bonds. Then, it refolds and clumps together. This creates a collection of bad proteins that ends up killing the neurons through a still unclear process. \n\nThe immune system, when faced with a problem, reacts in two main ways. It has the troops on the ground (innate immunity) that react to the signals put out by bacteria, parasites, and viruses. This is blind immunity: those cells don't know what they're fighting and can go full scorched earth. This is what causes initial inflammation. The body also has the specialized troops (adaptive immunity) that release special antibodies tailored to whatever bad things it's fighting. In the case of cancer, the body has built-in mechanisms to signal \"This cell is broken! Its DNA is damaged and it's dividing wrong, so kill it!\"\n\nIn the case of prions, none of these mechanisms are triggered. There isn't a pathogen that the immune system is recognizing, nor is there a \"take care of me, I'm broken\" signal. Our bodies' protective mechanism aren't triggered with prion diseases because it's just a surface protein that changes. Meanwhile, the prion works its way across the brain, misfolding and causing cell death. Because neurons in the brain have a miniscule potential to regenerate, you thus get the brain damage and signature death from prion diseases. \n\nThe reason I say \"not really\" instead of \"no\" is that there's new research suggesting that microglia (defensive macrophages/ground troops of the brain) may have a protective effect against prions by clearing up the plaques and misfolded proteins. However, there's other research that suggests that microglia are actually \"misfiring\" during prion diseases and make things worse. Like with many parts of the brain, there's still a lot we don't know.\n\nSources:\n\nhttps://www.ncbi.nlm.nih.gov/pmc/articles/PMC1986710/#__ffn_sectitle \n\nhttps://www.ncbi.nlm.nih.gov/pmc/articles/PMC5874746/\n\nhttps://www.ncbi.nlm.nih.gov/pmc/articles/PMC5750587/\n\nhttps://www.ncbi.nlm.nih.gov/pmc/articles/PMC2258253/?report=reader\n\nhttps://www.ncbi.nlm.nih.gov/pmc/articles/PMC2672014/#:~:text=Prion%20diseases%20are%20fatal%20disorders,(PrP)%3B%20and%20(5)\n\nhttps://pubmed.ncbi.nlm.nih.gov/29769333/\n\nhttps://pubmed.ncbi.nlm.nih.gov/30650564/", "upvote_ratio": 90.0, "sub": "AskScience"}411{"thread_id": "ull014", "question": "When 9/11 happened, did any of you think it suspicious at the time? Any of you witness it in person? \nDo you believe it to have been a conspiracy?", "comment": "I don't think it was a conspiracy. Never did. It opened the door to some really dark shit, though.", "upvote_ratio": 260.0, "sub": "AskOldPeople"}412{"thread_id": "ull014", "question": "When 9/11 happened, did any of you think it suspicious at the time? Any of you witness it in person? \nDo you believe it to have been a conspiracy?", "comment": "When the second tower hit, yes, I was suspicious that the first one wasn\u2019t a freak accident. \n\nLater, I learned that it was indeed a conspiracy among operatives of an extremist group called al Qaeda.", "upvote_ratio": 210.0, "sub": "AskOldPeople"}413{"thread_id": "ull014", "question": "When 9/11 happened, did any of you think it suspicious at the time? Any of you witness it in person? \nDo you believe it to have been a conspiracy?", "comment": "\"Do you believe it to have been a conspiracy\"\n\nhell yes. \n\nI also belive\n\nJewish Space Lasers started wildfires. \n\nmicrowaves  turn into cameras' and can spy on us\n\nbill gates is trying to microchip us all.\n\ncovid is fake.\n\nthe bowling green massacare coud have been prevented. \n\nand many more very provable things normal people dismiss. \n\n\n\nJust kidding.  I am not insane nor stupid.", "upvote_ratio": 150.0, "sub": "AskOldPeople"}414{"thread_id": "ullk4w", "question": "Hey y\u2019all. Just got a flu jab. Should I rest and deal with side effects or head out for an hour long walk? I have read that exercising after a flu shot can give a better immune boost. But I want the least side effects possible. So would a better immune response equal more side effects? \n\nI hope this makes sense. Please direct to the right sub if not the right place to ask. Thanks", "comment": "The CDC recommends exercising to reduce side effects:\n\n>To reduce pain and discomfort where the shot is given\n> * Apply a clean, cool, wet washcloth over the area.\n> * Use or exercise your arm.\n\n--[Possible Side Effects After Getting a COVID-19 Vaccine](https://www.cdc.gov/coronavirus/2019-ncov/vaccines/expect/after.html)\n\nMore generally, exercise helps immunity without increasing side effects:\n\n>\tAn unconventional behavioral \u201cadjuvant\u201d is physical exercise at the time of vaccination. \u2026 The results show that 90 min of exercise consistently increased serum antibody to each vaccine four weeks post-immunization, and IFN\u03b1 may partially contribute to the exercise-related benefit. \u2026 These findings suggest that adults who exercise regularly may increase antibody response to influenza or COVID-19 vaccine by performing a single session of light- to moderate-intensity exercise post-immunization.\n\n\u2014[Exercise after influenza or COVID-19 vaccination increases serum antibody without an increase in side effects](https://www.sciencedirect.com/science/article/pii/S0889159122000319)", "upvote_ratio": 190.0, "sub": "AskScience"}415{"thread_id": "ulmd2m", "question": "I want to make a sudoku game for a computer competition with a national phasea and my teacher recommended me to do it graphically. What should i use? (i only know c++ at the moment)", "comment": "I highly recommend you to check out the [OneLoneCoder Pixel Engine](https://github.com/OneLoneCoder/olcPixelGameEngine) It is a very nice graphics library to create games and it is just an .hpp file.", "upvote_ratio": 240.0, "sub": "cpp_questions"}416{"thread_id": "ulmd2m", "question": "I want to make a sudoku game for a computer competition with a national phasea and my teacher recommended me to do it graphically. What should i use? (i only know c++ at the moment)", "comment": "I would recommend SFML or SDL2. Raylib is also a solid choice, but I haven't used it personally.", "upvote_ratio": 190.0, "sub": "cpp_questions"}417{"thread_id": "ulmd2m", "question": "I want to make a sudoku game for a computer competition with a national phasea and my teacher recommended me to do it graphically. What should i use? (i only know c++ at the moment)", "comment": "I\u2019d say SDL2 as it can be used for many game related things and has tons of online help", "upvote_ratio": 60.0, "sub": "cpp_questions"}418{"thread_id": "ulnkiy", "question": "Was it common for healthcare professionals, undertakers, etc to catch influenza from handling bodies in the 1918 Flu epidemic?", "comment": "I was not able to find extremely specific information, but I cobbled some things up. \n\nThe short answer is that influenza doesn't survive well in dead bodies so the risk of getting it from a body is small. \n\nI found this guideline for body handlers in Australia that specifically mentions that there is basically no risk of catching the virus from a dead body who reached the mortuary or funeral home and that the risk is mostly from the family of the victim. \n\nhttps://www.health.nsw.gov.au/environment/factsheets/Pages/bodies-influenza.aspx\n\nWhile there is a small chance for a medical professional who deals with the very recently deceased to contact the disease from him, this didn't really happen during the height of the 1918 Flu Epidemic as the whole world was overrun with bodies. I've found this chilling article explaining how bodies were put in piles on the edges of the city or kept inside the home with ice on them to prevent decomposition. Basically, by the time someone was able to get to the body, the risk of getting infected was not present. \n\nhttps://www.history.com/.amp/news/spanish-flu-pandemic-dead", "upvote_ratio": 4870.0, "sub": "AskScience"}419{"thread_id": "ulnkiy", "question": "Was it common for healthcare professionals, undertakers, etc to catch influenza from handling bodies in the 1918 Flu epidemic?", "comment": "Nurses definitely got it.  One of the things that slowed down the response to the pandemic in 1918 was the fact that the people who were working hardest on treatment and trying to develop vaccines kept getting sick\n\nAs for handling the dead, probably not, as a respiratory virus it's just not that dangerous when the patient isn't breathing.", "upvote_ratio": 760.0, "sub": "AskScience"}420{"thread_id": "ulnkiy", "question": "Was it common for healthcare professionals, undertakers, etc to catch influenza from handling bodies in the 1918 Flu epidemic?", "comment": "\"During the fall and winter months of 1918, mortality rates among physicians and nurses presumed to have influenza were 0.64% and 0.53%, respectively.\" \nhttps://www.centerforhealthsecurity.org/cbn/2011/cbnreport_02042011.html", "upvote_ratio": 390.0, "sub": "AskScience"}421{"thread_id": "ulnvy4", "question": "The mullet, the crazy hairspray hair, it felt like everyone thought the bigger their hair was, the better. I always thought men were hotter when they had short hair. I didn't care for Kevin Costner until he got short hair for THE BODYGUARD and in that movie, it was hubba hubba. Before when he had the mullet, he looked like Billie Jean King. \n\nAnd thank god women stopped putting hairspray. Nothing ages you more than helmet hair or that hairspray hair that makes you look like you have a crown.", "comment": "Twenty years from now you're going to cringe when you see photos of the hairstyle you have now.", "upvote_ratio": 170.0, "sub": "AskOldPeople"}422{"thread_id": "ulnvy4", "question": "The mullet, the crazy hairspray hair, it felt like everyone thought the bigger their hair was, the better. I always thought men were hotter when they had short hair. I didn't care for Kevin Costner until he got short hair for THE BODYGUARD and in that movie, it was hubba hubba. Before when he had the mullet, he looked like Billie Jean King. \n\nAnd thank god women stopped putting hairspray. Nothing ages you more than helmet hair or that hairspray hair that makes you look like you have a crown.", "comment": "The man bun is the mullet of the current era. It will be mocked in the future.", "upvote_ratio": 100.0, "sub": "AskOldPeople"}423{"thread_id": "ulnvy4", "question": "The mullet, the crazy hairspray hair, it felt like everyone thought the bigger their hair was, the better. I always thought men were hotter when they had short hair. I didn't care for Kevin Costner until he got short hair for THE BODYGUARD and in that movie, it was hubba hubba. Before when he had the mullet, he looked like Billie Jean King. \n\nAnd thank god women stopped putting hairspray. Nothing ages you more than helmet hair or that hairspray hair that makes you look like you have a crown.", "comment": "Every generation manages to come up with styles that the succeeding generations think look stupid. The 80s were no exception.", "upvote_ratio": 70.0, "sub": "AskOldPeople"}424{"thread_id": "ulpzod", "question": "During Polymerase Chain Reaction, Why does Taq polymerase only extend the primer-DNA hybrid upto 1.5 kilo base pairs and not beyond that?", "comment": "Processivity has to do with the likelihood of the polymerase falling off the DNA. In cells there is a protein called the clamp which literally clamps around the DNA and anchors the polymerase to the DNA. This increases processivity enormously. Its not included in the PCR design because its an extra step that is hard to control by temperature alone and requires ATP to reload the clamp every time. For most gene lengths it turns out to not be necessary in a PCR.", "upvote_ratio": 250.0, "sub": "AskScience"}425{"thread_id": "ulqhld", "question": "Some of my team members argue that we should not use anything from the standard library or the standard template library, anything that starts with \"std ::\", as it may use dynamic memory allocation and we are prohibited to use that (embedded application). I argue that it is crazy to try to write copies of standard functions and you can always see which functions would need dynamic memory.\n\nPlease help me with some arguments. (Happy for my opinion but if you can change my mind I will gladly accept it.)", "comment": "That wording is already way too broad. Are you going to write your own `std::cos` function? I doubt it. Not to mention the few places where the core language is inseperably connected with parts of `std::`.\n\nYou can find out what parts of the standard \"may\" allocate memory. \n\nFor example `std::find` wont allocate memory, and `std::move` (both the utility as well as the algorithm) certainly wont.\n\nSure, the string and containers (apart from `std::array`) will allocate memory - but that is their entire point. Further, you could provide a custom alloctor if you need to.\n\nBanning \"all of std::\" is nonsensical. Go write assembly if you want.", "upvote_ratio": 790.0, "sub": "cpp_questions"}426{"thread_id": "ulqhld", "question": "Some of my team members argue that we should not use anything from the standard library or the standard template library, anything that starts with \"std ::\", as it may use dynamic memory allocation and we are prohibited to use that (embedded application). I argue that it is crazy to try to write copies of standard functions and you can always see which functions would need dynamic memory.\n\nPlease help me with some arguments. (Happy for my opinion but if you can change my mind I will gladly accept it.)", "comment": "I would say, \"What do you mean by 'may'? Like, maybe on a whim, because it's a Monday, that today's the day this function decides to allocate?\" Like, what's this \"may\" shit? You either know what you're talking about, or you don't know what you're talking about. Does a given thing allocate or not? And if so, how? It may blow your colleagues minds but you actually get a lot of control over such things in the STL because they tend to delegate important things to traits and policies. Your colleagues need to read a little, as it might save you all a shitload of work.\n\nThen again, writing your own dodgy stl-like library is not actually working on the real problem, which some people like to do, and it lends to job security because it's going to be such a pile of shit you guys would be at a loss to lose any of the original implementors. You see this project sabotage often in the industry.\n\nI am aware the STL isn't always available on an embedded platform, and that may be how you guys end up. I'm merely making the case that their arguments are lazy, if not dismissively ignorant. They want to sound like they know what they're talking about when it actually sounds like they don't. But if you have a whole team trying to agree with one another over this, it sounds like no one is really interested in the truth.", "upvote_ratio": 320.0, "sub": "cpp_questions"}427{"thread_id": "ulqhld", "question": "Some of my team members argue that we should not use anything from the standard library or the standard template library, anything that starts with \"std ::\", as it may use dynamic memory allocation and we are prohibited to use that (embedded application). I argue that it is crazy to try to write copies of standard functions and you can always see which functions would need dynamic memory.\n\nPlease help me with some arguments. (Happy for my opinion but if you can change my mind I will gladly accept it.)", "comment": "Writing your own implementation of something because you can't be bothered to look up whether it does dynamic memory allocation is clearly insane.  If you don't have dynamic memory allocation, it should be pretty instantly obvious when you try to use something that needs it and it fails to work properly.  std explicitly has stuff like std::array for situations where std::vector is inappropriate.", "upvote_ratio": 300.0, "sub": "cpp_questions"}428{"thread_id": "ulqwij", "question": "I'm working on legacy code that has the following three constructors:\n\n        // Constructor 1\n        ICLoggerFile(\n            const QString& filename = QString(),\n            ICLoggerModel::ICLoggerModelLogLevel level = ICLoggerModel::eICLoggerModelErrorLevel,\n            quint32 maxsize = 0,\n            quint32 backupfiles = 0,\n            bool append = true\n        );\n        \n        // Constructor 2\n        ICLoggerFile(\n            FILE* file,\n            ICLoggerModel::ICLoggerModelLogLevel level = ICLoggerModel::eICLoggerModelErrorLevel,\n            const QString& filename = QString()\n        );\n    \n        // Constructor 3\n        ICLoggerFile(\n            void* hnd,\n            ICLoggerModel::ICLoggerModelLogLevel level = ICLoggerModel::eICLoggerModelErrorLevel,\n            const QString& filename = QString()\n        );\n\nInside one of our unit tests, we create an object of the `ICLoggerFile` class as follows:\n\n    ICLoggerFile logfile(\"fooBar.log\");\n\nWe are using a 64-bit build (VS2019).  The strange thing is that on my local machine, the \\*first\\* constructor is called (as I would expect), but on our Jenkins build server, the \\*third\\* constructor is called, which is not what we want.\n\nMy educated guess is that `\"fooBar.log\"` is of type `const char*`, and for some reason on my local machine this string gets implicitly converted to a `const QString&` and the first constructor is called, while on our Jenkins build server, this does not happen and the third constructor is called.\n\nMy questions are:\n\n1. Is my reasoning correct?\n2. Why does this work on my own laptop, but not on our Jenkins build server?  Does this code have undefined behavior or a bug in it somewhere?\n3. How to refactor this code in two ways:\n   1. With as few changes as possible to make the problem go away, but maybe a bit less 'clean'.\n   2. With all the required changes to make the problem go away, and have a 'clean' solution.", "comment": "Picking the 3^rd is wrong since a pointer to const something is not convertible to a pointer to non-const void.\n\nIf your local and CI builds are using the same compiler, then they must be using different switches.  MSVC used to be lax about string conversions,  so I guess you have some permissive switch set.\n\nEdit :  yes,  there you go : https://godbolt.org/z/G89qd3qfv", "upvote_ratio": 50.0, "sub": "cpp_questions"}429{"thread_id": "ulrgn5", "question": "So my thought is simple, \n\nIf you see clearer at a further distance vs avg population, then your brain in turn has to process more data. \n\nOver the growth of a child, I have to imagine that much keener sight would cause a noticeable difference in ability to process information as you have to always process more. \n\nAny input on this curiosity?", "comment": ">If you see clearer at a further distance vs avg population, then your brain in turn has to process more data. \n\nThat matches intuition, but it ends up not being how neurovisual brain activity works. It's easy to think of ourselves as computers processing pixels in a classical computing loop (more pixels mean more processing, duh!) but we're not classical computing devices.\n\nLower-quality input signal can actually *increase* processing overhead in neural network processing, as more resolution of ambiguity, more interpolation, and more use of higher-order reanalysis is needed to check things.\n\nYou can observe this in people when you see someone who's visually challenged squint for a very long time to read something they might read quickly with correction or an easier task. They aren't generally collecting a bunch more raw visual data, but rather *thinking really hard*, in a specific way, to resolve poor signal.\n\nI'm approaching this from a computing background but I'd strongly suspect substantiation if we looked at something like fMRIs during increasingly difficult visual challenges \u2014 whether by different baseline acuity or just harder tasks, people's brains likely work a lot harder when things get blurrier.\n\nThat said, what gets particularly interesting is looking at neurological *development* in early life. The brain absolutely optimizes around signal received during a \"critical period\" and this leads to things uncorrected astigmatism and amblyopia creating neurologically ingrained visual deficits \u2014 and potentially downstream deficits to other modes, though that gets increasingly more speculative.\n\nhttps://pubmed.ncbi.nlm.nih.gov/29929004/", "upvote_ratio": 60.0, "sub": "AskScience"}430{"thread_id": "ulsdsi", "question": "I'm working on a compiler for one of the courses I need for my degree and I need to modify a major part of it (the expression evaluator) to handle optional references (I could just overload the entire thing but I don't want to duplicate code and create more work for myself). I came across `std::reference_wrapper` (and its helper functions, `std::ref` and `std::cref`). My question is: is it legal and okay to create an `std::optional<std::reference_wrapper<T>>` as a function parameter (since an `std::optional<T&>` is illegal)? If I, say, have an `std::optional<std::reference_wrapper<std::stringstream>>` and I want to write data to it and have that data remain when I return to the caller, would it be fine to use that (`std::optional<std::reference_wrapper<std::stringstream>>`) when declaring the function, or is this bad practice? Is there some better way I can use (while trying to avoid pointers)?", "comment": "That is fine and what `reference_wrapper` is intended for.\n\nBut let me suggest an alternative: A raw pointer. It is an indirection and it can be null. Problem sovled.", "upvote_ratio": 40.0, "sub": "cpp_questions"}431{"thread_id": "ulskr9", "question": "Well , the question is in the title , I've found **a lot** more websites that offer c++ courses/tutorials for starters than for C \n\n\nBut from my humble understanding : C is more simple than cpp and I may make some software for my Ubuntu pc with C \n\n\n\nAnyway, probably learning cpp is better, but the question still stands...", "comment": "> Is it worth to learn C before cpp ?\n\nNo. It is akin to learning latin before you learn italian.\n\nThere is nothing that you would learn in C that you cannot (and wont) learn in C++ (apart from the appriciation of C++'s features). At the same time, a lot of regular C would be pretty bad if not illegal C++.\n\nIn fact, by learning the \"simpler\" language first, you additionally burden yourself with doing a lot of stuff manually, that would take no effort in C++.\n\n---\n\n#www.learncpp.com\n\nis the best free tutorial out there. It covers everything from the absolute basics to advanced topics. It follows modern and best practice guidelines.\n\n---\n\nGeneric resource macro below:\n\n---\n\n#www.cppreference.com\n\nis the best language reference out there.\n\n---\n\nStay away from cplusplus.com ([reason](https://www.reddit.com/r/cpp_questions/comments/hjdaox/is_cpluspluscom_reliable_are_there_any/fwljj4w/)), w3schools ([reason](https://www.reddit.com/r/cpp_questions/comments/slvj8m/best_way_to_learn_c/hwczl34/)), geeks-for-geeks ([reason](https://www.reddit.com/r/cpp_questions/comments/p6305k/ways_to_learn_cpp/h9axoo7/)) and educba.com ([reason](https://www.reddit.com/r/cpp_questions/comments/rz5fkl/why_do_functions_pertaining_to_strings_on_visual/hrt7ez8/))\n\nMost youtube tutorials are of low quality, I would recommend to stay away from them as well. A notable exception are the [CppCon Back to Basics](https://www.youtube.com/user/CppCon/search?query=back%20to%20basics) videos. They are good, topic oriented and in depth explanations. However, they assume that you have *some* knowledge languages basic features and syntax and as such arent a good entry point into the language.\n\nAs a tutorial www.learncpp.com is just better than any other resource.", "upvote_ratio": 310.0, "sub": "cpp_questions"}432{"thread_id": "ulskr9", "question": "Well , the question is in the title , I've found **a lot** more websites that offer c++ courses/tutorials for starters than for C \n\n\nBut from my humble understanding : C is more simple than cpp and I may make some software for my Ubuntu pc with C \n\n\n\nAnyway, probably learning cpp is better, but the question still stands...", "comment": "Obligated mention: [CppCon 2015: Kate Gregory \u201cStop Teaching C\"](https://www.youtube.com/watch?v=YnWhqhNdYyk)", "upvote_ratio": 180.0, "sub": "cpp_questions"}433{"thread_id": "ulskr9", "question": "Well , the question is in the title , I've found **a lot** more websites that offer c++ courses/tutorials for starters than for C \n\n\nBut from my humble understanding : C is more simple than cpp and I may make some software for my Ubuntu pc with C \n\n\n\nAnyway, probably learning cpp is better, but the question still stands...", "comment": "They are separate languages. The important thing is that they have different idioms. What is good C is often bad C++. It's all too common that C programmers write a lot of really bad C++.\n\nBut there are lessons you can learn from C expressly for the purpose of learning C++. Namely, you don't have to make a class for every god damn thing. The problem with C++ is people mistaken it as an OOP language. It's not, it's a multi-paradigm language, that only so happens to include OOP. It's also a functional language for almost as long as it's been an OOP language. The vast majority of the STL was donated to C++98 by HP from their in-house Functional Template Library. The point is, classes and inheritance should be among the last things you reach for from the toolbox when crafting a solution.\n\nC++ is indeed a huge language, and learning it is hard because while you can pick up on the syntax quicky, it's the idioms that you really need to master. You can write a lot of really terrible code in C++ by virtue of being a big language. Then again you can write a lot of terrible C code by virtue of being akin to high level assembler. It's not, of course, but the comparison is often made for a reason.", "upvote_ratio": 170.0, "sub": "cpp_questions"}434{"thread_id": "ulswlv", "question": "I was just at the dentist who mentioned that he gets a lot of new mothers who need serious fillings or root canals, even if they had really healthy teeth pre-pregnancy and took good care of their dental health. I didn't get to ask deeply about it but physiologically, how does getting pregnant affect dental health so badly?", "comment": "It has to do with nutrition and vitamins! Basically when people make jokes about babies being parasites, there is a reason for that. The body has to provide to make the baby, and it just so happens that calcium is one of the things they need a massive amount of- for all those bones and calcium rich body parts (like teeth!)\n\nIt\u2019s also why some folks bones become more fragile during pregnancy.", "upvote_ratio": 410.0, "sub": "AskScience"}435{"thread_id": "ulswlv", "question": "I was just at the dentist who mentioned that he gets a lot of new mothers who need serious fillings or root canals, even if they had really healthy teeth pre-pregnancy and took good care of their dental health. I didn't get to ask deeply about it but physiologically, how does getting pregnant affect dental health so badly?", "comment": "Pregnancy-induced Gingivitis is extremely common, and is caused by the fluxuations and different hormones one goes through whilst pregnant. This can make it more difficult to properly clean the teeth due to the swollen tissues, or even dissuade people from doing so because of bleeding and soreness.\n\nAlso, morning sickness creates a higher acid level in the mouth which increases the rate of decay. And, even if there isn't vomitting, if there is heartburn/acid reflux/bile in the throat it does seep up into the oral cavit. And the growing pressure on the abdominal area only decreases the size of the stomach, which can also cause acid reflux. And don't get me started on frequent vomitting and its effect on teeth. (It can erode teeth very quickly and intensely.)", "upvote_ratio": 280.0, "sub": "AskScience"}436{"thread_id": "ulswlv", "question": "I was just at the dentist who mentioned that he gets a lot of new mothers who need serious fillings or root canals, even if they had really healthy teeth pre-pregnancy and took good care of their dental health. I didn't get to ask deeply about it but physiologically, how does getting pregnant affect dental health so badly?", "comment": "[removed]", "upvote_ratio": 90.0, "sub": "AskScience"}437{"thread_id": "ultkcv", "question": "Could there be cave paintings containing animals we haven't found fossil records for yet? And if there were, how would we tell if the animal being depicted was actually real and not some made up creature?", "comment": "Not as old as cave paintings but still pretty old is the Set animal. Some sort of canine with a forked tail, square ears and a long curved nose. Could be fanciful or a stylistic representation of a known animal or something that went extinct we haven't identified. Most experts lean to the fanciful, but we really don't know and the other gods are associated with real animals.", "upvote_ratio": 30580.0, "sub": "AskScience"}438{"thread_id": "ultkcv", "question": "Could there be cave paintings containing animals we haven't found fossil records for yet? And if there were, how would we tell if the animal being depicted was actually real and not some made up creature?", "comment": "Not a cave painting, but there's always the case of the \"[Meidum goose](https://news.artnet.com/art-world/extinct-goose-egypt-mona-lisa-1947028)\". The Meidum mural is one of Egypt's most famous ancient artworks, a 4,600-year-old painting found in the tomb of a prince named Nefermaat. One of the most interesting details of the mural is a picture of two geese, which have traditionally been identified as red-breasted geese, a species native to Siberia and not found anywhere near Egypt. However, there are a number of differences between the geese in the mural and real red-breasted geese. The red areas on their faces and breasts are smaller, and they have larger white patches on their necks and cheeks. \n\nThis has led to the suggestion that the Meidum geese are not, in fact, red-breasted geese at all, but the only known depiction of a goose native to Egypt that is now extinct. We already have remains of some animals that became extinct during the time of ancient Egypt, such as the Bennu heron (a giant heron that inspired the Egyptian mythical bird known as the Bennu),  but not of these geese. Egypt, at the time, was much wetter than it is today, and a number of animals are depicted in ancient Egyptian art that are now either extinct worldwide or no longer found in Egypt.", "upvote_ratio": 10240.0, "sub": "AskScience"}439{"thread_id": "ultkcv", "question": "Could there be cave paintings containing animals we haven't found fossil records for yet? And if there were, how would we tell if the animal being depicted was actually real and not some made up creature?", "comment": "We obviously know about horses, but there are petroglyphs of what appear to be horses and people on horseback in South America hundreds (possibly even thousands) of years after horses are believed to have gone extinct in the Americas. It is unclear if horses persisted within native oral tradition for dozens of generations (which is an incredible feat if true), or if horses persisted in areas long after the known fossil record indicates.", "upvote_ratio": 6470.0, "sub": "AskScience"}440{"thread_id": "ului03", "question": "Hi,\n\nI have a web service that does some reqwest calls to other services. I had quite a challenge to implement it in such a way that the request calls run in parallel, but only those that I need. In the end I got it working like this\n\n`let mut requests: Vec<Pin<Box<dyn Future<Output = Result<FeatureCollection>>>>> = vec![];`\n\nand then later\n\n`let mut responses: Vec<Result<FeatureCollection>> = futures::future::join_all(requests).await;`\n\nAll requests return Featurecollections which is a geo format. So far so good. The web server was `actix_web`, and it worked. Now I need to migrate away from `actix` to `warp`, and this is where I run into problems. If I run this code in the handler\n\n    pub async fn handler(mut body: impl Buf) -> Result<impl Reply, Rejection> {\n      // call above code through async functions\n    }\n\nThe compiler complaints as follows:\n\n    error: future cannot be sent between threads safely\n       --> src/main.rs:24:10\n        |\n    24  |         .and_then(handlers::plots::handler);\n        |          ^^^^^^^^ future returned by `handler` is not `Send`\n        |\n        = help: the trait `std::marker::Send` is not implemented for `dyn warp::Future<Output = std::result::Result<geojson::FeatureCollection, Rejection>>`\n    note: future is not `Send` as this value is used across an await\n       --> src/controllers/plots.rs:46:92\n        |\n    20  |     let mut requests: Vec<Pin<Box<dyn Future<Output = Result<FeatureCollection>>>>> = vec![];\n        |         ------------ has type `Vec<Pin<Box<dyn warp::Future<Output = std::result::Result<geojson::FeatureCollection, Rejection>>>>>` which is not `Send`\n    ...\n    46  |     let mut responses: Vec<Result<FeatureCollection>> = futures::future::join_all(requests).await;\n        |                                                                                            ^^^^^^ await occurs here, with `mut requests` maybe used later\n\nI sort of get what the error means I think. apparently the trait Send is needed in order for this to work in a multithreaded environment, and Box/Pin don't implement that trait.\n\nBut how do I fix it?", "comment": "You can't implement Send yourself, the compiler is the one that decides if a type is Send or not.\n\nRead [this chapter](https://doc.rust-lang.org/book/ch16-03-shared-state.html) of the book, it describes how to share data between threads.", "upvote_ratio": 40.0, "sub": "LearnRust"}441{"thread_id": "ulw45v", "question": "I was infusing some whiskey and had overfilled the bottle. I noticed when I attempted to force the cork on wood chips that had been floating quickly sank only to rise when I removed the cork. It was overfilled to the point there was no airgap so it didn't seem I was forcing air into the solution and shaking the bottle with the cork forced on didn't cause any change so it's more than currents from the motion of corking. \n\nMy next guess was when you first cork the density at the top of the bottle was higher and it needed time to reach equilibrium. But the. Holding it for a minute or two the pieces never rose until I uncorked it again. \n\nI may be totally misremembering college physics but If I'm increasing pressure I should be slightly compressing the ethanol and increasing the density of it which increases the buoyant forces acting on the chips?\n\nMy only guess is the increased pressure pushed fluid into airpockets in the wood forcing the air out, like cloth getting wet. But then why is it so easily reversible, when I release the cork how is air getting back into those pockets?", "comment": "The increased pressure on the liquid could have compressed the air in the wood chips. That would increase the density of the wood chips, and they sink.\n\nWhen you take the cork out, pressure drops. The air bubbles in the wood chips push the liquid back out, density drops, and the chips float.\n\nThe air might be staying in the chips, just shrinking and expanding as the liquid pressure changes.", "upvote_ratio": 70.0, "sub": "AskScience"}442{"thread_id": "ulw45v", "question": "I was infusing some whiskey and had overfilled the bottle. I noticed when I attempted to force the cork on wood chips that had been floating quickly sank only to rise when I removed the cork. It was overfilled to the point there was no airgap so it didn't seem I was forcing air into the solution and shaking the bottle with the cork forced on didn't cause any change so it's more than currents from the motion of corking. \n\nMy next guess was when you first cork the density at the top of the bottle was higher and it needed time to reach equilibrium. But the. Holding it for a minute or two the pieces never rose until I uncorked it again. \n\nI may be totally misremembering college physics but If I'm increasing pressure I should be slightly compressing the ethanol and increasing the density of it which increases the buoyant forces acting on the chips?\n\nMy only guess is the increased pressure pushed fluid into airpockets in the wood forcing the air out, like cloth getting wet. But then why is it so easily reversible, when I release the cork how is air getting back into those pockets?", "comment": "Liquids are often not noticeably compressible under normal human temperatures and pressures.\n\nIs it possible that what happened is the compression was (near) entirely forced on the cork which was compressed until it no longer displaced its weight and therefore lost buoyancy?", "upvote_ratio": 60.0, "sub": "AskScience"}443{"thread_id": "ulw45v", "question": "I was infusing some whiskey and had overfilled the bottle. I noticed when I attempted to force the cork on wood chips that had been floating quickly sank only to rise when I removed the cork. It was overfilled to the point there was no airgap so it didn't seem I was forcing air into the solution and shaking the bottle with the cork forced on didn't cause any change so it's more than currents from the motion of corking. \n\nMy next guess was when you first cork the density at the top of the bottle was higher and it needed time to reach equilibrium. But the. Holding it for a minute or two the pieces never rose until I uncorked it again. \n\nI may be totally misremembering college physics but If I'm increasing pressure I should be slightly compressing the ethanol and increasing the density of it which increases the buoyant forces acting on the chips?\n\nMy only guess is the increased pressure pushed fluid into airpockets in the wood forcing the air out, like cloth getting wet. But then why is it so easily reversible, when I release the cork how is air getting back into those pockets?", "comment": "[removed]", "upvote_ratio": 30.0, "sub": "AskScience"}444{"thread_id": "ulx2s9", "question": "Where did you attend college, what years, and what was the overall experience like?", "comment": "Undergrad is in agriculture from a college in the Deep South. If you\u2019ve seen Letterkenny, it was that, but without hockey.", "upvote_ratio": 30.0, "sub": "AskOldPeople"}445{"thread_id": "ulx2s9", "question": "Where did you attend college, what years, and what was the overall experience like?", "comment": "It was great being away from my awful parents, but my fellow students were such dumbasses. People will reminisce about the great friends they still have from college and I'll wonder why the fuck there didn't seem to be anyone great at my college.", "upvote_ratio": 30.0, "sub": "AskOldPeople"}446{"thread_id": "ulx2s9", "question": "Where did you attend college, what years, and what was the overall experience like?", "comment": "Went straight from high school in '77 to working in a publishing career. Lied a little in the interview. Fake it till ya make it. Seems like a lifetime ago. Oh, it was!", "upvote_ratio": 30.0, "sub": "AskOldPeople"}447{"thread_id": "ulxe65", "question": "What was it like living during the AIDS/HIV crisis, was it scary?", "comment": "It was the best of times, it was the worst of times.  In 1980 at age 22 I  took a semester off, moved to Austin, Texas and jumped into the gay crowd with both feet.  I made  a number of good friends, almost all of them are dead now.  The first couple years of the decade were a blast.   Then the plague came.   Some people were terrified, others were stunned and became reclusive (for many, it was too late).   After the test came out in 85(?), the first question acquaintences would ask is \"did you get / are you getting the test.\" I didn't for some years, more on that below.  Society in general was still freaking out - absolute hysteria. Everyone was afraid, some with good reason (\\*raises hand*) but a fuckload of people were just reacting hysterically.    You never saw someone go into the hospital, but people were disappearing from the scene and we didn't bother wondering what happened to them. A lot of people did like me, and tried to ignore it, but I did start having safer sex.   So for me, the latter part of the decade was spent expecting to get sick and die at some point before too long.  \n\nWhen I had returned to school in 89, I just assumed that I was infected. Turns out I was right but I wouldn't know that for another years and a half.  During which time I met a guy and fell in love. When we hit \"move in together\" we decided that it was probably best too know for sure.  Not because there was much  that could make a difference in the end but for his sake. So in 91 I got tested.   Funny story - the counselor was a friend of his, an acquaintence for me, and when we went to get the test results she was more rattled by my being HIV+ about it than either of us was.   He was an AIDS educator,  we had discussed it a lot, and I had been prepping myself for years.  He promised to stick by me to the end. I had so few CD4 cells that I was thinking about giving them names, so we expected the end to happen fairly soon - doctors gave me six to twelve months. (HAH HAH, I say in Nelson Muntz's voice - I didn't die ppthhpththtp.) Somehow I managed to stay alive, we never had to do the home hospice thing,  and next month  we'll celebrate the 30th anniversary of our commitment ceremony.", "upvote_ratio": 2510.0, "sub": "AskOldPeople"}448{"thread_id": "ulxe65", "question": "What was it like living during the AIDS/HIV crisis, was it scary?", "comment": "I studied for my doctorate with two people, one of whom (a gay man) had AIDS. He was a funny, brave, smart, wonderful person. We helped each other prepare for orals and our dissertation defenses. \n\nAt first we didn't realize he was sick but then he began to fail quickly. I went to visit him in the hospital and this was at the height of people treating those with AIDS as if they were lepers. The fourth or fifth time I visited it was clear he wouldn't last much longer. In addition to everything else he suffered (rife with Kaposi's sarcoma), he seemed fearful. I remember holding his hand, and how he suddenly found some physical strength in how tightly he gripped mine. \n\nWhen I was leaving I knew in my heart that all the fears about touching someone with AIDS were wrong and that it wasn't a guarantee you would Catch It Too. I bent over to kiss him on the head and we embraced. I knew we were saying goodbye.\n\nThere was not widespread, casual acceptance of alternate lifestyles in the Reagan era. The terrible things people said about gay men at that time are now kind of coming back to me in the hateful way that people interact today regarding some political issues. \n\nHe was a kindhearted, witty, good person; he passed away a few months before getting his degree conferred. Myself, our co-studier, and our professors paid tribute to him at the convocation. It was an impossibly sad time, there was so much sadness it's hard to explain, and so many fine people were lost. \n\nWill always miss you, Doug.", "upvote_ratio": 1910.0, "sub": "AskOldPeople"}449{"thread_id": "ulxe65", "question": "What was it like living during the AIDS/HIV crisis, was it scary?", "comment": "As someone who was (as far as I knew then) straight, not promiscuous (i.e., a loser), and living in a place (Trenton NJ) not particularly known as a gay hotspot?\n\nIt was still fucking terrifying. Yeah, it was originally billed as \"Gay Cancer,\" but it was pretty quickly established that it's not a gay disease. Anyone could get this thing.\n\nI moved to San Francisco in 1996, when I was just turning 23. Made friends with many, many people who were DIRECTLY affected by AIDS - lost loved ones or were HIV positive. The stories are bone-chilling, horrible, they made me literally weep out of empathy.", "upvote_ratio": 1280.0, "sub": "AskOldPeople"}450{"thread_id": "ulxgmo", "question": "Hi Everyone,\n\nHere is my Matrix Multiplication C++ OpenMP code that I have written. I am trying to use OpenMP to optimize the program. The sequential code speed was 7 seconds but when I added openMP statements but it only got faster by 3 seconds. I thought it was going to get much faster and don't understand if I'm doing it right.\n\nThe OpenMP statements are in the fill\\_random function and in the matrix multiplication triple for loop section in main.\n\nI would appreciate any help or advice you can give to understand this!\n\n​\n\n    #include <iostream>\n    #include <cassert>\n    #include <omp.h>\n    #include <chrono>\n    \n    using namespace std::chrono;\n    \n    \n    double** fill_random(int rows, int cols )\n    {\n        \n        double** mat = new double* [rows]; //Allocate rows.\n        #pragma omp  parallell collapse(2) \n        for (int i = 0; i < rows; ++i)\n        {\n            mat[i] = new double[cols];           // added\n            for( int j = 0;  j < cols; ++j)\n            {\n                mat[i][j] = rand() % 10;\n            }\n           \n        }\n         return mat;\n    }\n    \n    \n    double** create_matrix(int rows, int cols)\n    {\n        double** mat = new double* [rows]; //Allocate rows.\n        for (int i = 0; i < rows; ++i)\n        {\n            mat[i] = new double[cols](); //Allocate each row and zero initialize..\n        }\n        return mat;\n    }\n    \n    void destroy_matrix(double** &mat, int rows)\n    {\n        if (mat)\n        {\n            for (int i = 0; i < rows; ++i)\n            {\n                delete[] mat[i]; //delete each row..\n            }\n    \n            delete[] mat;  //delete the rows..\n            mat = nullptr;\n        }\n    }\n    \n    int main()\n    {\n        int rowsA = 1000; // number of rows\n        int colsA= 1000; // number of coloumns\n        double** matA = fill_random(rowsA, colsA);\n    \n    \n        int rowsB = 1000; // number of rows\n        int colsB = 1000; // number of coloumns\n        double** matB = fill_random(rowsB, colsB);\n    \n    \n    //Checking matrix multiplication qualification\n        assert(colsA == rowsB);\n    \n    \n        double** matC = create_matrix(rowsA, colsB);\n    \n        //measure the multiply only\n        const auto start = high_resolution_clock::now();\n    \n        //Multiplication\n        #pragma omp parallel for \n        \n        for(int i = 0; i < rowsA; ++i)\n        {\n            for(int j = 0; j < colsB; ++j)\n            {\n                for(int k = 0; k < colsA; ++k) //ColsA..\n                {\n                    matC[i][j] += matA[i][k] * matB[k][j];\n                }\n            }\n            \n        }\n    \n        const auto stop = high_resolution_clock::now();\n        const auto duration = duration_cast<seconds>(stop - start);\n    \n        std::cout << \"Time taken by function: \" << duration.count() << \" seconds\" << std::endl;\n    \n    \n    \n        //Clean up..\n        destroy_matrix(matA, rowsA);\n        destroy_matrix(matB, rowsB);\n        destroy_matrix(matC, rowsA);\n    \n        return 0;\n    }", "comment": "Move the `matC[i][j]` assignment out of the loop.\n\nAnd pls, no more nested arrays. Double indirection on every element access isn't a great idea. Just use 1D `std::vector`.\n\n*And if I enable AVX2+fp:fast on MSVC, I get FMA instructions.\n\n*`std::for_each(std::execution::par` appears to be slightly faster, but you need an index iterator.\n\n*I'm getting this inner loop:\n\n\t00007FF6BE8417A2  vmovsd      xmm0,qword ptr [r8-10h]  \n\t00007FF6BE8417A8  vfmadd231sd xmm2,xmm0,mmword ptr [r9+r13*8]  \n\t00007FF6BE8417AE  vmovsd      xmm0,qword ptr [r8-8]  \n\t00007FF6BE8417B4  vfmadd231sd xmm2,xmm0,mmword ptr [r9+r15*8]  \n\t00007FF6BE8417BA  vmovsd      xmm1,qword ptr [r8]  \n\t00007FF6BE8417BF  vfmadd231sd xmm2,xmm1,mmword ptr [r9]  \n\t00007FF6BE8417C4  vmovsd      xmm0,qword ptr [r8+8]  \n\t00007FF6BE8417CA  vfmadd231sd xmm2,xmm0,mmword ptr [r9+r12*8]  \n\t00007FF6BE8417D0  add         r9,r14  \n\t00007FF6BE8417D3  lea         r8,[r8+20h]  \n\t00007FF6BE8417D7  sub         rcx,1  \n\t00007FF6BE8417DB  jne         `main'::`4'::<lambda_1>::operator()+0D2h (07FF6BE8417A2h) \n\nOddly, when I do it the \"cache friendly\" way (with `vfmadd231pd`), it's much slower.\n\n*https://codereview.stackexchange.com/questions/177616/avx-simd-in-matrix-multiplication\n\n*https://gist.github.com/nadavrot/5b35d44e8ba3dd718e595e40184d03f0\n\n*A simple blocking gives a decent speed up:\n\n\tfor (int j = 0; j < localColsB; j += 8)\n\t{\n\t\tdouble x[8]{};\n\t\tfor (int k = 0; k < localColsA; ++k)\n\t\t\tfor (int jj = 0; jj < 8; ++jj)\n\t\t\t\tx[jj] += rowA[k] * localMatB(k, j + jj);\n\t\tfor(int jj = 0; jj < 8; ++jj)\n\t\t\trowC[j + jj] = x[jj];\n\t}\n\n*Fixed bug. Cache friendly version is much faster. 30ms on 12600. Same result hash as original code.", "upvote_ratio": 30.0, "sub": "cpp_questions"}451{"thread_id": "ulxixy", "question": "I\u2019ve been obsessed with aging recently (not in a good way, mind you) and I can\u2019t help but notice that I\u2019ve yet to meet a single person who\u2019s 40 or older that still has fun like they did in their teens, 20s, and 30s. Does anyone still get drunk as fuck at parties? Is romance still exciting? Do wild ass things still happen to you that\u2019ll be stories you tell for years to come? I\u2019m terrified of life becoming as boring as it seems when I look at all the older people I know.", "comment": "Do people still do some of that? Sure. But I don't, and I have awesome times. As you get older what you find enjoyable changes.\n\nI mean, in another universe there's someone who's posted to r/ask20somethings asking \"do people in their 20s and 30s still have fun? I mean like, watching cartoons, going down the slide FRONTWARDS AND BACKWARDS, drinking whole sodas? I'm 11 now and it just seems like people in their 20s seem to be boring as shit\"", "upvote_ratio": 1270.0, "sub": "AskOldPeople"}452{"thread_id": "ulxixy", "question": "I\u2019ve been obsessed with aging recently (not in a good way, mind you) and I can\u2019t help but notice that I\u2019ve yet to meet a single person who\u2019s 40 or older that still has fun like they did in their teens, 20s, and 30s. Does anyone still get drunk as fuck at parties? Is romance still exciting? Do wild ass things still happen to you that\u2019ll be stories you tell for years to come? I\u2019m terrified of life becoming as boring as it seems when I look at all the older people I know.", "comment": "Absolutely still having a blast in my 50s. Just not doing stupid shit like I did in my 20s.", "upvote_ratio": 540.0, "sub": "AskOldPeople"}453{"thread_id": "ulxixy", "question": "I\u2019ve been obsessed with aging recently (not in a good way, mind you) and I can\u2019t help but notice that I\u2019ve yet to meet a single person who\u2019s 40 or older that still has fun like they did in their teens, 20s, and 30s. Does anyone still get drunk as fuck at parties? Is romance still exciting? Do wild ass things still happen to you that\u2019ll be stories you tell for years to come? I\u2019m terrified of life becoming as boring as it seems when I look at all the older people I know.", "comment": "I had _more_ fun in my 40s than in my 20s. Including great parties, great travel experiences, awesome friends. I\u2019ve had much more exciting romance in my 40s than in my 20s. I love going to metal gigs.\n\nI still get somewhat drunk sometimes, but \u201cgetting drunk as fuck at parties\u201d really does get boring as you get older, so I wouldn\u2019t call that fun.\n\nYour idea of fun changes as you get older. When I hear my step daughter talking with her friends about partying and going out that sounds mind numbingly boring to me. And of course she thinks what my gf and I talk about is boring as well.\n\nSo you may not be meeting many 40yr olds you think aren\u2019t boring, but that\u2019s just because those 40yr olds aren\u2019t interested in the same stuff young people are into.", "upvote_ratio": 420.0, "sub": "AskOldPeople"}454{"thread_id": "ulzraf", "question": "Edit: I was thinking about kidney and liver transplants, where the donor may still be alive.", "comment": "Interesting question. \n\nBroadly, there are three types of rejection: hyperacute, acute and chronic.\n\nIn hyperacute rejection the organ gets damaged really quickly by premade antibody and immune cell activity. I reckon by the time this was diagnosed the organ would be pretty badly damaged. \n\nIn acute and chronic rejection there is an influx of immune cells which recognise the organ as foreign. In general, this process is recognised by deteriorating graft function, and treated by altering immunosuppression.  In this case there are two issues. \n\nThe first is that organ dysfunction has already occurred. This is not necessarily irreparable, but makes retransplanting an organ a challenging proposition. \n\nThe other is that the organ is now suffused with immune cells from the recipient, so transplanting these back into the original donor may have some negative effect, similar to graft Vs host disease. Except we already know they are primed against the donors cells, and theres a lot of inflammation around, so even more risky.\n\nThese issues, combined with the fact that you wouldn't take an organ from someone who couldn't tolerate losing it, and the ever present risk of major surgery, mean that it would never be in the donors best interest to get a retransplant of their own organ. \n\nI can't find any literature on the issue on a cursory look, but will update if I find anything. And am always happy to be corrected.\n\nEdit:\n\n[This](https://onlinelibrary.wiley.com/doi/10.1111/ctr.14554) paper talks about retransplanting transplanted kidneys in the absence of rejection into new recipients (I.e. not the original donor). It has happened 4 times in Europe in the past 20 years. It shows at least that a previously transplanted kidney can be retransplanted safely.", "upvote_ratio": 1180.0, "sub": "AskScience"}455{"thread_id": "ulzraf", "question": "Edit: I was thinking about kidney and liver transplants, where the donor may still be alive.", "comment": "Unfortunately for most organ transplants the donor is dead, so it wouldn't be much use to them.  The time window for transplants is pretty small and the rejection would damage the organ really badly, so I doubt it would be much use to anyone else either", "upvote_ratio": 290.0, "sub": "AskScience"}456{"thread_id": "ulzraf", "question": "Edit: I was thinking about kidney and liver transplants, where the donor may still be alive.", "comment": "Well there are instances of healthy donor organs being re-donated and used if that person were to die, but I think if the organ were rejected it would be too damaged to be useful in anyone else. As far as being given back to the donor I don't think that would be possible because of blood supply issues. Like you could remove Kidney A and later put it where B is, but you couldn't put it back where it originally was because the blood supply would no longer be there. But I could be wrong.", "upvote_ratio": 70.0, "sub": "AskScience"}457{"thread_id": "um18by", "question": "Hi. I came across an AI engineer mentioning in an interview that \"AI is just compression\". I was struggling to understand what this means. I figured he was talking about the link of information theory to AI but not sure. He also mentioned the hutter prize which led him to this epiphany of \"AI is just compression\". It seems like a gross oversimplification but maybe there is some logic in there that I am unable to understand.\n\nAlso, can you guys point me towards some resources on this topic. I would love to learn more about \"AI is just compression\"\n\n​\n\nEdit: I am talking about these 2 things\n\n[https://en.wikipedia.org/wiki/Hutter\\_Prize](https://en.wikipedia.org/wiki/Hutter_Prize)\n\n[https://youtu.be/boiW5qhrGH4](https://youtu.be/boiW5qhrGH4)", "comment": "EDIT: There's some criticism of my use of the term \"AI\" versus \"ML\". I'm answering the question as I think OP intended it, which is covering the subset of AI which is popular today, which is really ML. So if you read this, and it bugs you that I use AI, please read ML instead, it's what I really mean. If it's not immediately obvious to you why there's a difference or distinction between AI and ML, then there are some interesting discussion in this thread about it.\n\nIt\u2019s probably better to start by saying \u201cAI is just statistics\u201d. \n\nMost AI techniques boil down to [curve fitting](https://en.m.wikipedia.org/wiki/Curve_fitting) (effectively). You take a bunch of data points and try to come up with a function which would generate those same data points given the same inputs (for input/output pairs you already know) and the \u201cright\u201d output for inputs where you don\u2019t already know the answer. \n\nThe big difference with AI is how many data points you feed in to your fitting process, and how many dimensions your curve function has. Dimensions means the number of inputs and outputs. \n\nYou might have trillions of data points you\u2019re fitting and and your curve might have thousands of dimensions. \n\nTaking a huge amount of data and finding a way to represent that data as a (relatively) simple curve or function is \u201cjust compression\u201d. So it\u2019s ok to say that \u201cAI is just compression\u201d \n\nYou won\u2019t really find a book or text on this topic. It\u2019s just a cute observation by someone who knows the subject matter really well. It\u2019s kind of an oversimplification, but it\u2019s a good one.", "upvote_ratio": 480.0, "sub": "AskComputerScience"}458{"thread_id": "um18by", "question": "Hi. I came across an AI engineer mentioning in an interview that \"AI is just compression\". I was struggling to understand what this means. I figured he was talking about the link of information theory to AI but not sure. He also mentioned the hutter prize which led him to this epiphany of \"AI is just compression\". It seems like a gross oversimplification but maybe there is some logic in there that I am unable to understand.\n\nAlso, can you guys point me towards some resources on this topic. I would love to learn more about \"AI is just compression\"\n\n​\n\nEdit: I am talking about these 2 things\n\n[https://en.wikipedia.org/wiki/Hutter\\_Prize](https://en.wikipedia.org/wiki/Hutter_Prize)\n\n[https://youtu.be/boiW5qhrGH4](https://youtu.be/boiW5qhrGH4)", "comment": "Are you sure he said AI and not machine learning?\n\nMachine learning can be seen as function estimation.  For a given ML problem, there is some true function which is either intractable or unknown, and the task of ML is to come up with a good guess of a function that gets the right answers most of the time (or perhaps we make the stronger claim of getting right answers to within a formally bounded degree of correctness).\n\nThis can be seen as a form of compression.  The mapping of problem cases to answers is the uncompressed data, the true function is the output of lossless compression (assuming no noise in the data set), and the ML-discovered function is the output of lossy compression.\n\nIt seems like overstating the case to say that ML _is_ compression, though.  And certainly there's more to AI than just ML, and a lot of the non-ML parts of AI don't seem to be about compression.  (Except in the trivial sense that all cognition is kinda-sorta about compression: when we come up with a category like \"tree\" or \"dog\" and classify certain objects into it, we are using \"compression\" to avoid the mental effort that would otherwise be required to know the properties of every individual object.)", "upvote_ratio": 160.0, "sub": "AskComputerScience"}459{"thread_id": "um18by", "question": "Hi. I came across an AI engineer mentioning in an interview that \"AI is just compression\". I was struggling to understand what this means. I figured he was talking about the link of information theory to AI but not sure. He also mentioned the hutter prize which led him to this epiphany of \"AI is just compression\". It seems like a gross oversimplification but maybe there is some logic in there that I am unable to understand.\n\nAlso, can you guys point me towards some resources on this topic. I would love to learn more about \"AI is just compression\"\n\n​\n\nEdit: I am talking about these 2 things\n\n[https://en.wikipedia.org/wiki/Hutter\\_Prize](https://en.wikipedia.org/wiki/Hutter_Prize)\n\n[https://youtu.be/boiW5qhrGH4](https://youtu.be/boiW5qhrGH4)", "comment": "Your brain doesn't actually store data but it learns how to reproduce by conditioning your neurones. Instead of storing big amounts of data, you can train a set of neurones, which will consume less space compared to the data itself, hence compression.\n\nIt won't be bit perfect though. Using AI for *real* compression is not a good solution.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}460{"thread_id": "um1faj", "question": "What signals are they receiving and why would an enemy plane or munition emit these signals in the first place?", "comment": ">What signals are they receiving \n\nImagine you're hiding in a dark room. And you know someone is looking for you: because in that darkness you can see someone using a flashlight, inspecting every dark corner where you might be hiding ...\n\nIt's the same thing with whatever electromagnetic signal you're using to find and track enemy airplanes: There's got to be a constant stream (like a flashlight in a dark room) of signals (e.g. radio waves emitted by a radar) in order to see anything.\n\nBack to you in the dark room: How do you know you were found? Because the person holding the flashlight is shining the light directly into your face, dead on, and they have stopped looking into other corners ... They obviously know exactly where you are, right?\n\nSame thing with e.g. radar-tracking: Once a radar is starting to track and aim at a target that airplane will know it's being aimed at because there will be a constant beam of radio waves in frequencies that are very typical for a radar...\n\nIn modern military airplanes the radar warning should go off and warn the pilot that he's being aimed at.\n\nSame thing if you use other tracking methods, e.g. laser: Modern military airplanes and helicopters have a laser-warning sensor too.\n\n​\n\n>why would an enemy plane or munition emit these signals in the first place?\n\nSee the analogy with the dark room: how are you going to find someone in a very very dark room without a flashlight? Stumble in blindly and just touch everything, hoping your sense of touch will do the job? Yell and shout into the room and politely ask the other person to come out?  The flashlight is the easiest and safest way.\n\nSame thing with finding and tracking enemy airplanes: you have to emit signals (e.g. radar) or else you're blind. But it also means that the other side can detect where that signal came from...\n\nIt's a \"cat and mouse\" game.", "upvote_ratio": 600.0, "sub": "AskScience"}461{"thread_id": "um1faj", "question": "What signals are they receiving and why would an enemy plane or munition emit these signals in the first place?", "comment": "In short, the different mechanisms for achieving the lock can be detected.  Active radar homing has a radar in the missile sending out signals. Those signals can be detected and classified by the target aircraft. Passive radar homing has a receiver in the missile reacting to specific signals bounced off of the target by the launching system.\n\nTo your question about \u201cwhy would it be built that way\u201d, in order for the attacking plane\u2019s lock to work, those signals need to be in place.  No one has created a way to effectively mask the signal in a way that would persist the target lock.  So, science to mask the signal hasn\u2019t caught up with science to achieve the lock in the first place.", "upvote_ratio": 90.0, "sub": "AskScience"}462{"thread_id": "um1faj", "question": "What signals are they receiving and why would an enemy plane or munition emit these signals in the first place?", "comment": "Combat aircraft will have an RWR (radar warning receiver).  This will alert them to the radar signals of various possible threats.  Most RWR's will be able to tell the difference between various threats, like a specific type of enemy aircraft, or specific type of surface to air missle system.\n\nIt also knows when one of the threats is specifically tracking them, or \"locking them up\".  It knows this because instead of seeing a blip of radar energy every few seconds as the radar sweeps across the sky, it sees a constant focus of radar on them as the tracking radar basically points right at them.", "upvote_ratio": 30.0, "sub": "AskScience"}463{"thread_id": "um28lu", "question": "i.e. the '60s, '70s, etc...", "comment": "The 2020s already seem like a full fricking decade.", "upvote_ratio": 210.0, "sub": "AskOldPeople"}464{"thread_id": "um28lu", "question": "i.e. the '60s, '70s, etc...", "comment": "2020", "upvote_ratio": 210.0, "sub": "AskOldPeople"}465{"thread_id": "um28lu", "question": "i.e. the '60s, '70s, etc...", "comment": "The 80s, simply because I spent so much of them waiting to be older, to be out of high school, out of my parents house and away from the boring, parochial, minuscule town they'd  settled in.", "upvote_ratio": 80.0, "sub": "AskOldPeople"}466{"thread_id": "um4vqh", "question": "Imagine a struct, having 5 doubles as members + implicit constructors. An instance of this obj is passed to a function by value. Before the function does anything, in the debugger you see that the members are different than their assignments. What might be modifying this copy constructed temp object? We had to pass the obj by reference to solve the issue.", "comment": "Maybe nothing was wrong and the function simply didn't set itself up yet.", "upvote_ratio": 120.0, "sub": "cpp_questions"}467{"thread_id": "um4vqh", "question": "Imagine a struct, having 5 doubles as members + implicit constructors. An instance of this obj is passed to a function by value. Before the function does anything, in the debugger you see that the members are different than their assignments. What might be modifying this copy constructed temp object? We had to pass the obj by reference to solve the issue.", "comment": "The function will expand the stack space to accommodate your struct, and then copy the values from the callee into that space. Before the copy, however, the struct will contain uninitialized values - garbage left over from previous calls. \n\nWith the debugger, always assume that the function starts at the *first statement* inside the scope.", "upvote_ratio": 50.0, "sub": "cpp_questions"}468{"thread_id": "um5fkv", "question": "There are some movies that whenever they are on, I have to stop what I am doing and watch them.  Yes, I've seen them TONS of time but they grab me everytime. Know what I mean? What are yours?\n\n\\#1 Shawshank Redemption  \n\\# 2 Peggy Sue Got Married  \n\\# 3 Die Hard", "comment": "You may not like my answer, since it's not a movie (well, it *was* a movie, but. . .), but anytime I come across an episode of M.A.S.H. I always watch.  It doesn't matter that I've seen every episode a half-dozen times.", "upvote_ratio": 360.0, "sub": "AskOldPeople"}469{"thread_id": "um5fkv", "question": "There are some movies that whenever they are on, I have to stop what I am doing and watch them.  Yes, I've seen them TONS of time but they grab me everytime. Know what I mean? What are yours?\n\n\\#1 Shawshank Redemption  \n\\# 2 Peggy Sue Got Married  \n\\# 3 Die Hard", "comment": "On the lighter side *The Princess Bride* is not something I'll miss if available and for something more dramatic  *Master and Commander: The Far side of the World*  with Russell Crowe.   Is there a better period style actor out there?  *Gladiator* is another solid historical movie.", "upvote_ratio": 240.0, "sub": "AskOldPeople"}470{"thread_id": "um5fkv", "question": "There are some movies that whenever they are on, I have to stop what I am doing and watch them.  Yes, I've seen them TONS of time but they grab me everytime. Know what I mean? What are yours?\n\n\\#1 Shawshank Redemption  \n\\# 2 Peggy Sue Got Married  \n\\# 3 Die Hard", "comment": "O Brother Where Art Thou", "upvote_ratio": 240.0, "sub": "AskOldPeople"}471{"thread_id": "um5gwq", "question": "I'm asking this as a fellow \"old person\". (44 F).\n\nIs there a meal service geared toward senior citizens?\nMy mom, who just turned 75, barely eats anything.  She's maybe 90 pounds. She has to do a low sodium diet per her doctor because of heart problems.  She doesn't like to cook so she eats mostly toast with jam or TV dinners. Those aren't low sodium but it's basically all she eats in a day. \n\nI know there are meal delivery services like Hello Fresh where they send you ingredients to cook every week unless you opt out. She's looking for precooked meals that you just heat up. But it seems like most of these are geared towards a family, there is no \"single \" option unless you want to pay top dollar. Another difficulty is she doesn't have any internet service. \n\nMeals on Wheels wouldn't work for her as she's a capable adult who can drive. She's willing to pay. Is there anything she can do?", "comment": "I don\u2019t know the answer as an \u201cold person\u201d, but as a nurse of 30 years, I\u2019d call her doctor, tell him/her your concerns, and let the multitude of social service options rain on your mother.\n\nI know it seems overwhelming, but there really is a way in this country to feed the elderly; if you need reassurance, send me a DM, tell me where you live, and I\u2019m happy to research your options. Got your back, and thanks for caring so much about your mom; in my experience, that\u2019s not always happening. Take care.", "upvote_ratio": 200.0, "sub": "AskOldPeople"}472{"thread_id": "um5gwq", "question": "I'm asking this as a fellow \"old person\". (44 F).\n\nIs there a meal service geared toward senior citizens?\nMy mom, who just turned 75, barely eats anything.  She's maybe 90 pounds. She has to do a low sodium diet per her doctor because of heart problems.  She doesn't like to cook so she eats mostly toast with jam or TV dinners. Those aren't low sodium but it's basically all she eats in a day. \n\nI know there are meal delivery services like Hello Fresh where they send you ingredients to cook every week unless you opt out. She's looking for precooked meals that you just heat up. But it seems like most of these are geared towards a family, there is no \"single \" option unless you want to pay top dollar. Another difficulty is she doesn't have any internet service. \n\nMeals on Wheels wouldn't work for her as she's a capable adult who can drive. She's willing to pay. Is there anything she can do?", "comment": "I volunteer for Meals on Wheels in my area. At least here,there is no restriction based on ability to drive. If you need/want the service,you can participate. If low income,there are subsidies. If not,you can pay the full price. However,the meals are not low sodium or made with individual dietary concerns. I myself ,age 64 ,use Daily Harvest,which is plant based,very healthy and frozen. You heat up in microwave or toss in blender for smoothies. Pretty tasty. Not cheap but not overly expensive in my opinion. You could order for your mom based on her preferences. Also,sometimes eating alone is not enjoyable and some company at mealtimes makes all the difference in how much food is consumed.", "upvote_ratio": 100.0, "sub": "AskOldPeople"}473{"thread_id": "um5gwq", "question": "I'm asking this as a fellow \"old person\". (44 F).\n\nIs there a meal service geared toward senior citizens?\nMy mom, who just turned 75, barely eats anything.  She's maybe 90 pounds. She has to do a low sodium diet per her doctor because of heart problems.  She doesn't like to cook so she eats mostly toast with jam or TV dinners. Those aren't low sodium but it's basically all she eats in a day. \n\nI know there are meal delivery services like Hello Fresh where they send you ingredients to cook every week unless you opt out. She's looking for precooked meals that you just heat up. But it seems like most of these are geared towards a family, there is no \"single \" option unless you want to pay top dollar. Another difficulty is she doesn't have any internet service. \n\nMeals on Wheels wouldn't work for her as she's a capable adult who can drive. She's willing to pay. Is there anything she can do?", "comment": "Get an Instant Pot or slow cooker, make soup or stew by the gallon, and freeze it for her in individual microwave containers. You can do several different batches so that she\u2019s always  got some variety.", "upvote_ratio": 80.0, "sub": "AskOldPeople"}474{"thread_id": "um8ehb", "question": "Hi, I've been trying to cross compile my C++ code using the \"-arch i386\" and GCC outputs that it's deprecated for mac OS. I just wanted to know if there is any work around.", "comment": "Cross-compile it to what target?  \n\nYou could also compile up your own toolchain.  But afaik: macOS stopped supporting 32-bit some time ago.", "upvote_ratio": 90.0, "sub": "cpp_questions"}475{"thread_id": "um8nb0", "question": "I've been using Dev C++, but it often crashes/closes itself and I lose all unsaved stuff. \n\nI've already tried Visual Studio Code (couldn't make it work correctly), Code::Block (it doesn't seems to have skin support?).\n\nIf those are the best IDEs, how do I compile by cli? I don't really mind using notepad++. lol...", "comment": "You making your life hell. Download visual studio 2022 community edition. And make it easy on yourself.", "upvote_ratio": 130.0, "sub": "cpp_questions"}476{"thread_id": "um8t09", "question": "I  am asking because I am learning remotely and trying to prioritize which  subjects to focus on. Like how much should they know about each of these  topics more or less and which matter the most? Are any other points more important that I should have included? Or are there too many types of jobs using C++ to make any generalizations? To be clear, me being able to make this list only means that I at least know that each item exists, not that I already know a lot about each of them, that is why I am asking  this:\n\n* Classes, Objects, Constructors, and Destructors\n* Data Types and Keywords\n* Namespaces\n* Overloading Operators\n* Inheritance\n* Polymorphism\n* Move Semantics\n* Smart Pointers & RAII\n* Exception Handling\n* I/O and Streams\n* Iterators\n* <Algorithm>      \n\n* STL\n* Lambdas, Function Objects and Function Pointers\n* Generic Templating\n* Creating and Linking Libraries\n* Cmake\n* Unit Testing\n* Concurrency\n* 3rd Party Libraries\n* Data Structures\n* Sorting Algorithms\n* IPC\n* Debuggers\n* Differences between Compilers\n* Using Different Compiler Flag Options\n* Memory Debugging, Memory Leak Detection, and Profiling\n* Differences between the C++ Standards\n* Differences between Operating Systems\n* Different Ways of Allocating\n\nThank you", "comment": "What very often people do not want to admit is that you are expected to know all of this in entry level. What is not expected is how to combine all of this to solve a problem.", "upvote_ratio": 560.0, "sub": "cpp_questions"}477{"thread_id": "um8t09", "question": "I  am asking because I am learning remotely and trying to prioritize which  subjects to focus on. Like how much should they know about each of these  topics more or less and which matter the most? Are any other points more important that I should have included? Or are there too many types of jobs using C++ to make any generalizations? To be clear, me being able to make this list only means that I at least know that each item exists, not that I already know a lot about each of them, that is why I am asking  this:\n\n* Classes, Objects, Constructors, and Destructors\n* Data Types and Keywords\n* Namespaces\n* Overloading Operators\n* Inheritance\n* Polymorphism\n* Move Semantics\n* Smart Pointers & RAII\n* Exception Handling\n* I/O and Streams\n* Iterators\n* <Algorithm>      \n\n* STL\n* Lambdas, Function Objects and Function Pointers\n* Generic Templating\n* Creating and Linking Libraries\n* Cmake\n* Unit Testing\n* Concurrency\n* 3rd Party Libraries\n* Data Structures\n* Sorting Algorithms\n* IPC\n* Debuggers\n* Differences between Compilers\n* Using Different Compiler Flag Options\n* Memory Debugging, Memory Leak Detection, and Profiling\n* Differences between the C++ Standards\n* Differences between Operating Systems\n* Different Ways of Allocating\n\nThank you", "comment": "You get paid to get shit done, not how many language feature checkboxes you can tick off. The programming language is just scratching the surface of what\u2019s important in a software engineering job.", "upvote_ratio": 270.0, "sub": "cpp_questions"}478{"thread_id": "um8t09", "question": "I  am asking because I am learning remotely and trying to prioritize which  subjects to focus on. Like how much should they know about each of these  topics more or less and which matter the most? Are any other points more important that I should have included? Or are there too many types of jobs using C++ to make any generalizations? To be clear, me being able to make this list only means that I at least know that each item exists, not that I already know a lot about each of them, that is why I am asking  this:\n\n* Classes, Objects, Constructors, and Destructors\n* Data Types and Keywords\n* Namespaces\n* Overloading Operators\n* Inheritance\n* Polymorphism\n* Move Semantics\n* Smart Pointers & RAII\n* Exception Handling\n* I/O and Streams\n* Iterators\n* <Algorithm>      \n\n* STL\n* Lambdas, Function Objects and Function Pointers\n* Generic Templating\n* Creating and Linking Libraries\n* Cmake\n* Unit Testing\n* Concurrency\n* 3rd Party Libraries\n* Data Structures\n* Sorting Algorithms\n* IPC\n* Debuggers\n* Differences between Compilers\n* Using Different Compiler Flag Options\n* Memory Debugging, Memory Leak Detection, and Profiling\n* Differences between the C++ Standards\n* Differences between Operating Systems\n* Different Ways of Allocating\n\nThank you", "comment": "I would argue everything from the first block. However, you don't have to know everything in detail.\nFor example: \nYou should know how to use streams, though special stuff as using std::fill I've never used in my 10 year career. Even when useful, I would expect someone to give you std::format instead.\n\nI wouldn't expect you to know the second block (given some exceptions like unit testing), i do expect that they'll teach you where relevant.\n\nIn general, I'm convinced when you are able to demonstrate usage of algorithms and unique_ptr. This combines containers and their iterators, lambdas, RAII, templates (calling them), function overloading, lifetime ...\nAfterwards, I would expect you to be able to explain what you did and how it works. \n\nI believe that when you are able to understand this, you can learn everything else. So if you never used a function pointer, some googling or asking around will most likely be sufficient to use it in its basic form. When a company is deep into something, I would expect them to either be explicit about it or teach you. It's not acceptable to assume any developer to understand the whole of c++", "upvote_ratio": 50.0, "sub": "cpp_questions"}479{"thread_id": "um9oz4", "question": "Hi guys, nooby question from an electronics tinkerer. For reference this is for a microcontroller with very minimal resources.\n\nThe WiFi api for my microcontroller (ESP32) requires me to set a struct member that is a `uint8_t[32]` for the SSID. The docs simply showed `xyz.ssid = \"name\"` but that gives the error \"must be modifiable lvalue\". A typecast gives an error for loss of precision. I've tried implementing  a c-string strcpy, but can't make it work.\n\nI ended up implementing a disgusting process of setting each ssid array element to an individual char to make it work but it feels hacky and wrong. \n\nI'm sure there is a better way to do this, can anyone help?", "comment": "> For reference this is for a microcontroller with very minimal resources and I'm trying to avoid including lots of headers.\n\nThese two statements do not correlate. A header does not have any runtime overhead in and of itself. The code in the headers is likely much more optimised that what you or I could write.", "upvote_ratio": 60.0, "sub": "cpp_questions"}480{"thread_id": "um9vff", "question": "Which book does it exactly refers to?", "comment": "Are you asking about \"a book that specifically provides an introduction to programming\"? There are tons of intro books out there, and I don't think they're referring to a specific one. Here's my favorite: https://openbookproject.net/thinkcs/python/english3e/", "upvote_ratio": 140.0, "sub": "LearnRust"}481{"thread_id": "um9vff", "question": "Which book does it exactly refers to?", "comment": "It\u2019s not referring to a literal book. [The book](https://doc.rust-lang.org/book/) is just a Medium sized online course so that you can get started with rust.", "upvote_ratio": 120.0, "sub": "LearnRust"}482{"thread_id": "umb4gq", "question": "Can non alcoholic beer grow botulism , especially If the cans are a little swollen at the top and one of the bottoms of the cans was popped outwards. You always hear about how you should never consume anything from a swollen or dented can, but what is the likelihood of botulism spores growing in a commercially sold non alcoholic beer?", "comment": "The most important component for botulism risk is pH. The sterilized canning method is a primary means of safety but having acidity in the food is considered a secondary safety barrier. A swollen can is likely over-pressure caused by secondary fermentation, spoilage, or freezing. Botulinum growth of course doesn't necessary produce any noticeable signs of spoilage so something appearing fine could in fact be contaminated with toxin. Botulinum spores are ubiquitous in the environment so improper canning technique should be assumed to be contaminated and unsafe for consumption. This precisely why we commonly see headlines like these: [Soul Cedar Farm recalls peppers over Clostridium botulinum contamination](https://www.foodsafetynews.com/2022/04/soul-cedar-farm-recalls-peppers-over-clostridium-botulinum-contamination/)\n\nCDC of course recommends \"When in doubt, throw it out\" which is really great advice. Botulism really, really sucks.\n\n[https://www.cdc.gov/botulism/consumer.html](https://www.cdc.gov/botulism/consumer.html)", "upvote_ratio": 40.0, "sub": "AskScience"}483{"thread_id": "umb7p8", "question": "In my custom class I would like to overload & operator so that it returns the address of a member variable.\nIs this a safe approach as I assume it would make it impossible to get the address of the class object or should I just use a 'getMemberAddr()' function", "comment": ">  I assume it would make it impossible to get the address of the class object \n \nIt would still be possible using [`std::address_of`](https://en.cppreference.com/w/cpp/memory/addressof).  \n \nIn general, it is highly discouraged to overload the unary `&` operator. I think adding the `getMemberAddr()` function would be a better approach. \n \nAlternatively, you might also consider having an accessor `getMember()`, having it return a (potentially const) reference, and using it like so `&obj.getMember()`. I think this is a bit more consistent with how most people write accessors.", "upvote_ratio": 80.0, "sub": "cpp_questions"}484{"thread_id": "umb7p8", "question": "In my custom class I would like to overload & operator so that it returns the address of a member variable.\nIs this a safe approach as I assume it would make it impossible to get the address of the class object or should I just use a 'getMemberAddr()' function", "comment": "The important consideration to make is how confusing this implementation will be to someone who's seeing it with no context. Operators are defined with a very specific set of semantics in mind. If you start changing what those semantics mean, your code suddenly becomes unintelligible to anyone not already familiar with it, or worse, apparently intelligible but secretly doing something unexpected behind-the-scenes.", "upvote_ratio": 30.0, "sub": "cpp_questions"}485{"thread_id": "umbn40", "question": "I am just curious if it is better practice to use a macro instead of creating a new variable?\n\n    void csvParser::formatImportCell(csvCell& _cell)\n    {\n        \n        std::string& cellReference = _cell.getCellReference();\n        // #define cellReference _cell.getCellReference()\n    \n        // Remove enclosing quotes\n        if (cellReference[0] == '\\\"') {\n            stringLibrary::chopLeft(cellReference, 1);\n            stringLibrary::chopRight(cellReference, 1);\n        }\n        \n        // Remove double quotes\n        stringLibrary::replace(cellReference,\"\\\"\\\"\", \"\\\"\");\n        \n        // #undef cellReference\n    \n    }\n\nin this case, I would replace the variable with the macro to the function. \n\n(If I remember correctly I should also use Macros as all caps lock, but I have just left it with the same as the variable name for clarity)", "comment": "Using a macro in modern C++ is (almost) never a good idea. You should try to never have to use them.", "upvote_ratio": 90.0, "sub": "cpp_questions"}486{"thread_id": "umbn40", "question": "I am just curious if it is better practice to use a macro instead of creating a new variable?\n\n    void csvParser::formatImportCell(csvCell& _cell)\n    {\n        \n        std::string& cellReference = _cell.getCellReference();\n        // #define cellReference _cell.getCellReference()\n    \n        // Remove enclosing quotes\n        if (cellReference[0] == '\\\"') {\n            stringLibrary::chopLeft(cellReference, 1);\n            stringLibrary::chopRight(cellReference, 1);\n        }\n        \n        // Remove double quotes\n        stringLibrary::replace(cellReference,\"\\\"\\\"\", \"\\\"\");\n        \n        // #undef cellReference\n    \n    }\n\nin this case, I would replace the variable with the macro to the function. \n\n(If I remember correctly I should also use Macros as all caps lock, but I have just left it with the same as the variable name for clarity)", "comment": "It would be absolutely atrocious to define a macro like what you just showed there:\n\n1. Macros are entities only the preprocessor can see. When you compile your code the file is first passed through the preprocessor and your macro will mean that at every point after that macro definition the word `cellReference` will be replaced by `_cell.getCellReference()`, even outside this function! You can of cause `#undef cellReference` at the last line of the function, but that just adds complexity. Macros don't know scope - they are not C++ code!\n\n2. Your alternative is a reference variable. A reference variable is not required to actually have a place in memory - in your case it will almost surely just be an alias, i.e. the compiler will actually do what you want: it will just replace `cellReference` with `_cell.getReference()` within the scope where `cellReference` is visible.\n\nAs others said: Macros are almost always a bad idea. If you think \"Should I use a macro here?\" the answer is in 99.999% of cases \"No\". Don't use macro unless there is literally NO OTHER WAY. Macros are for doing one thing on Windows and another on Linux, or one thing on x86-64 and another on ARM, or sometimes you can use paramterized macros for code generation in e.g. unit testing frameworks. But that's it. There are proper C++ constructs for all other cases, and they will have no performance penalty.", "upvote_ratio": 30.0, "sub": "cpp_questions"}487{"thread_id": "umbn80", "question": "For the wisest among us, what would be the best advice you would say to your loved ones about life?", "comment": "Well, I don't know if I am \"the wisest\" of folks, but after 50 years of marriage, raising two kids, being on a job site for 45 years, getting & remaining sober for 18,000+ days, and retiring, becoming a widower, a grandfather, and now being a great-grandfather, my advice to my loved ones is the same as always:\n\nDear Loved Ones:  \n\nTake good care of your teeth. You will not regret it. \n\nYou do not have to say everything you think. Sometimes just keeping your mouth shut is a good idea. \n\nIt costs you nothing to be kind to the people, and the animals, you love. Taking a moment to share a kind word or a smile is time well spent. \n\nDon't forget to flirt with your spouse. Just because you have been married for awhile does not mean you need to stop having fun, holding hands, or making out in the car in the driveway. It just means you do it in your own driveway, not your parent's. Treat your life partner well, with love, kindness, and respect, not because of some holiday or anniversary, but because that is how you show your love for the loved ones in your life.\n\nFall down? Get up, brush yourself off, and start again. Repeat as needed.\n\nFind a hobby, sport or pasttime that you can do any time you want, and really enjoy it. Let it become a source of pleasure and joy in your life, something you can turn to when you are stressed out, bored, or worried. You will never regret having interests that bring you joy, make you smarter, relax you, or give you the opportunity to meet others.\n\nLearn to cook. \n\nHang up the phone. Don't forget to spend time in nature. Move your body every day, out from in front of screens and into the sunshine or the rain. Your physical and mental health will benefit from daily outdoor activities, even if you just walk around the block.\n\nTravel when you can, even if it's in your own part of the world. Play music. Fall in love. Life is a gift - open it and do everything. \n\nLearn something every day. At 72 years old, I still have lots on my \"To Do\" list, and I don't let a single day go by without learning something.  \n\nHope you all are doing well. Your friend, Herman\u2764", "upvote_ratio": 190.0, "sub": "AskOldPeople"}488{"thread_id": "umbn80", "question": "For the wisest among us, what would be the best advice you would say to your loved ones about life?", "comment": "It is not even remotely fair.  Get over the notion that it will be and you will be better prepared for the crap that will come your way.", "upvote_ratio": 50.0, "sub": "AskOldPeople"}489{"thread_id": "umbn80", "question": "For the wisest among us, what would be the best advice you would say to your loved ones about life?", "comment": "Live it. Do it. Love who you love with reckless abandon and take chances. Travel. Never stop learning. \n\nAlso, a fucked up brain chemistry can take you down deeper than you know. Be aware not everyone can do what you can. Be patient with small children and old people and pets. Be kind to others and to yourself. \n\n\nYou like those flowers? Send some to yourself! Money in the bank is great, but not at the cost of not enjoying the now. Skinny dip at least once. Respect nature. Youth is fleeting and one day you'll wake up and 20 years have passed.\n\n\nIf you have a child, know one day you won't know will be the last time you won't be carrying them in your arms. And you won't even be aware, so don't bemoan their dependency on you. \n\n\nOne day you'll talk to your parents and end with an \"ok,ttyl, love you too\" and the next they'll be gone. Tell them now how you remember those little things, promise, they'll remember checking you out of school to go on that picnic too. \n\n\nDon't be unmoving in your opinions, politics, and religion or lack of. Time changes us all.\n\n\nBe the best you ...doesn't matter if you're an astronaut or a vagabond, just give it a decent shot.\n\n\nI miss my parents so much right now. Even though they didn't teach me those things, I learned them anyway and understand their flaws. They probably did the best they could with what they knew or were capable of. \n\n\nForgive.", "upvote_ratio": 30.0, "sub": "AskOldPeople"}490{"thread_id": "umbwe2", "question": "I have as a resource `std::ifstream filestream`, and re-use it for a loop that iterates over filenames:\n```\nfor ( string &filename : filenames ) {\n    filestream.open(filename);\n    sleep(1);            //work\n    filestream.close();\n}\n```\nIs my understanding correct:\n- I believe this introduces a memory leak, if the process exits during the `//work` portion of the code.\n- One way to solve this is to make filestream a `std::unique_ptr<std::ifstream>`. This works because both the allocated ifstream and the unique_ptr stay in scope, and ifstream remains re-usable for a call to `open()` after `filestream.get().close()` has been closed on it.\n\nAlso, is this the best way to go about this? (see question title)", "comment": "Why are you reusing that filestream? For performance? Are you actually resuing it? Calling open() and close() is like constructing and destructing that object, so why not just move it inside the scope of for? Then you'll have a perfectly standard RAII stream.", "upvote_ratio": 90.0, "sub": "cpp_questions"}491{"thread_id": "umbwe2", "question": "I have as a resource `std::ifstream filestream`, and re-use it for a loop that iterates over filenames:\n```\nfor ( string &filename : filenames ) {\n    filestream.open(filename);\n    sleep(1);            //work\n    filestream.close();\n}\n```\nIs my understanding correct:\n- I believe this introduces a memory leak, if the process exits during the `//work` portion of the code.\n- One way to solve this is to make filestream a `std::unique_ptr<std::ifstream>`. This works because both the allocated ifstream and the unique_ptr stay in scope, and ifstream remains re-usable for a call to `open()` after `filestream.get().close()` has been closed on it.\n\nAlso, is this the best way to go about this? (see question title)", "comment": "`ifstream` closes in its destructor, it is already a proper RAII type.\n\nthe code is perfectly fine as it is and changing it will make it much worse.  \nit may make sense to just not reuse it though and make a local `ifstream` inside the loop.\n\nif it were a `std::vector`, reusing it is much more beneficial", "upvote_ratio": 40.0, "sub": "cpp_questions"}492{"thread_id": "umbyou", "question": "Is there a way to get nex element when using a ranged for loop?\n\nFor example can you implement a basic bouble sort with 2 for range?", "comment": "no, you will need to manually loop with index or iterators for sorting", "upvote_ratio": 50.0, "sub": "cpp_questions"}493{"thread_id": "umdbot", "question": "I wrote a little bit ago a cmd based program to track my status of series i watch with my girlfriend. The data is saved in a .csv like \u201eSeriesname(char[40]);actualseason(int);actualepisode(int);allseasons(int);allepisodes(int);restepisodes(int)\u201c. The variables are created by a structarray which gets it\u2019s length by the number of lines in the .csv.\n\nThe program works fine via the command input, but I hate to do everytime the inputline in cmd. I thought about transform my program to winapi, wich i never used before. I get started with a tutorial and kind of understand how it works. I was able to create a button, Textfield and listbox and debug it with a cmd output to see what happens.\n\nI implemented the csv read function and i can output everything in cmd. I tried to send the Names via Sendmessage to my listbox, with \u201e(LPARAM)\u201cthis is a Name\u201c\u201c I could fill the listbox, but with \u201e(LPARAM)Struct.Seriesname\u201c it do not work. So it must be the wrong type I think, but I did not find a solution by google it.\n\nIs there an easy way to fix this?\n\nI can provide my code when I\u2019m at home if needed.", "comment": "Do yourself a favour, and use a modern UI framework, such as Qt, or WxWidgets instead of fighting with the Windows API.", "upvote_ratio": 70.0, "sub": "cpp_questions"}494{"thread_id": "ume5c8", "question": "I feel bad for the horny ppl of the past specifically women\n\nhttps://mobile.twitter.com/broyeanice/status/1443665239132839938", "comment": "I rather doubt these are real. It\u2019s easy to fake something to look old. Some of the items on the list are not suspect but some of them just sound like what people today think happened back then.  Maybe I missed it but I don\u2019t see any sources cited for this.\n\nIt\u2019s been attributed to McCall\u2019s magazine from 1958.  After thinking about it some more, I actually don\u2019t see that many differences between it and what Cosmopolitan magazine suggests. They are equally idiotic. So to be fair, some of those tips are not bad in truth. Get a dog and walk it? I don\u2019t see anything bad there. Even if you don\u2019t catch a husband, you have a nice pet and you\u2019re getting some exercise. Win-win lol.", "upvote_ratio": 70.0, "sub": "AskOldPeople"}495{"thread_id": "ume5c8", "question": "I feel bad for the horny ppl of the past specifically women\n\nhttps://mobile.twitter.com/broyeanice/status/1443665239132839938", "comment": "No first hand experience, but the family history of those days is filled with frustration, forced and failed marriages, judging other family members for seeking happiness, women seen as spinsters at 25, not allowed to educate themselves and forced to stop working when pregnant, partners deemed unfit and other questionable things. And yes, that advice was taken seriously, or at least seen as serious advice. \n\nAnd while some advice was clearly bad and discriminating, some of it was very important. As moving too fast forward with a relationship could easily lead to contracting a disease, becoming pregnant and/or ending up in poverty. As health care and birth control was lacking and poverty was much more common.", "upvote_ratio": 60.0, "sub": "AskOldPeople"}496{"thread_id": "ume5c8", "question": "I feel bad for the horny ppl of the past specifically women\n\nhttps://mobile.twitter.com/broyeanice/status/1443665239132839938", "comment": "People like to read, and so other people crank out shit for them to read. It's better to think of that shit as shit to read, and maybe add some of your own shit if you're reading it in the outhouse, and if you're the type of person who takes that shit seriously, there's a good chance you do use an outhouse. \n\ntldr: It's bung-fodder.", "upvote_ratio": 50.0, "sub": "AskOldPeople"}497{"thread_id": "umegcg", "question": "Why We won't have to move to RUST?", "comment": "You don't have to move to Rust, but you can. It's quite nice there: https://en.wikipedia.org/wiki/Rust%2C_Burgenland", "upvote_ratio": 40.0, "sub": "LearnRust"}498{"thread_id": "umg72y", "question": "I am working on a system in which some actions are time critical, and other actions have to be executed periodically without particular schedule. I can do a certain number of actions until I need to do the time critical stuff again. This number is not always the same. At the moment I use a loop like this:\n    \n    int actions_allowed, state = 0; \n    while (true){ \n        // Time critical stuff, actions_allowed is calculated here\n        \n        while (actions_allowed-- > 0){\n            switch (state++){\n                case 0:\n                    // Do stuff...\n                    break;\n                case 1:\n                    // Do stuff...\n                    break;\n                ...\n                case 25:\n                    state = 0;\n                    //do stuff\n            }\n        }\n    }\n\nThis is a bit tedious to write. The numbers don't have actual meaning, they just represent an order. If I want to insert something between case 5 and casee 4 I have to change 20 numbers manually. Is there a smarter way to do this?\n\nI thought of the way below, is this less efficient as it uses a lot of incrementation and if statements as opposed to a switch statement?\n\n    while (actions_allowed-- > 0){\n        int comparator = 0;\n        if (state == comparator++){\n            // do stuff\n        } else if (state == comparator++){\n            // do stuff\n        } else if (state == comparator++){\n            // do stuff\n        ...\n        } else {\n            state = -1;\n        }\n        state++;\n    }", "comment": "Function pointers are awesome for this sort of thing.", "upvote_ratio": 110.0, "sub": "cpp_questions"}499{"thread_id": "umg72y", "question": "I am working on a system in which some actions are time critical, and other actions have to be executed periodically without particular schedule. I can do a certain number of actions until I need to do the time critical stuff again. This number is not always the same. At the moment I use a loop like this:\n    \n    int actions_allowed, state = 0; \n    while (true){ \n        // Time critical stuff, actions_allowed is calculated here\n        \n        while (actions_allowed-- > 0){\n            switch (state++){\n                case 0:\n                    // Do stuff...\n                    break;\n                case 1:\n                    // Do stuff...\n                    break;\n                ...\n                case 25:\n                    state = 0;\n                    //do stuff\n            }\n        }\n    }\n\nThis is a bit tedious to write. The numbers don't have actual meaning, they just represent an order. If I want to insert something between case 5 and casee 4 I have to change 20 numbers manually. Is there a smarter way to do this?\n\nI thought of the way below, is this less efficient as it uses a lot of incrementation and if statements as opposed to a switch statement?\n\n    while (actions_allowed-- > 0){\n        int comparator = 0;\n        if (state == comparator++){\n            // do stuff\n        } else if (state == comparator++){\n            // do stuff\n        } else if (state == comparator++){\n            // do stuff\n        ...\n        } else {\n            state = -1;\n        }\n        state++;\n    }", "comment": "How about:\n\n    static constexpr std::array<void(*)(), 25> actions {&action_0, &action_1, /*...*/, &action_25};\n\nNow you can write a simple algorithm:\n\n    std::for_each(std::begin(actions), std::next(std::begin(actions), allowed_actions), std::invoke<void()>);", "upvote_ratio": 40.0, "sub": "cpp_questions"}500{"thread_id": "umg72y", "question": "I am working on a system in which some actions are time critical, and other actions have to be executed periodically without particular schedule. I can do a certain number of actions until I need to do the time critical stuff again. This number is not always the same. At the moment I use a loop like this:\n    \n    int actions_allowed, state = 0; \n    while (true){ \n        // Time critical stuff, actions_allowed is calculated here\n        \n        while (actions_allowed-- > 0){\n            switch (state++){\n                case 0:\n                    // Do stuff...\n                    break;\n                case 1:\n                    // Do stuff...\n                    break;\n                ...\n                case 25:\n                    state = 0;\n                    //do stuff\n            }\n        }\n    }\n\nThis is a bit tedious to write. The numbers don't have actual meaning, they just represent an order. If I want to insert something between case 5 and casee 4 I have to change 20 numbers manually. Is there a smarter way to do this?\n\nI thought of the way below, is this less efficient as it uses a lot of incrementation and if statements as opposed to a switch statement?\n\n    while (actions_allowed-- > 0){\n        int comparator = 0;\n        if (state == comparator++){\n            // do stuff\n        } else if (state == comparator++){\n            // do stuff\n        } else if (state == comparator++){\n            // do stuff\n        ...\n        } else {\n            state = -1;\n        }\n        state++;\n    }", "comment": "You could use an enum to avoid manually shifting the numbers when you want to insert a step into the middle:\n\nhttps://godbolt.org/z/vTrhrMa4M\n\nAdding the post_init step in order just means making sure it is in order inside the enum, it doesn't matter where it ends up in the switch (though you should prefer in order there as well.) \n\nBe aware the static cast in this example could result in narrowing conversion if you have too many states.", "upvote_ratio": 30.0, "sub": "cpp_questions"}501{"thread_id": "umgtsg", "question": "Basically a question on self sufficiency!", "comment": "Most states would be fucked in this context. The US is reliant on cross-border travel for just about everything", "upvote_ratio": 4380.0, "sub": "AskAnAmerican"}502{"thread_id": "umgtsg", "question": "Basically a question on self sufficiency!", "comment": "I feel like most states would struggle for a while if this happened. We would have serious water issues to deal with.", "upvote_ratio": 3970.0, "sub": "AskAnAmerican"}503{"thread_id": "umgtsg", "question": "Basically a question on self sufficiency!", "comment": "Extremely. A lot of people won't be able to get to work or home. Even using public transit to travel within the state will become impossible.", "upvote_ratio": 3760.0, "sub": "AskAnAmerican"}504{"thread_id": "umhb2t", "question": "With the symptoms being so close to the common cold or a flu, wouldn't most doctors have simply assumed that the first patients were suffering from one of those instead?  What made us suspect it was a new virus, and not an existing one?", "comment": "The symptoms were nothing like the cold or flu, thousands were dying in Asia. Virus samples are frequently DNA sequenced worldwide as part of a monitoring program. A new sequence was correlated with high death rates or need for ventilators.  \n\nA better question is once we knew for certain we had a new and deadly variant of coronavirus,  why did most of the world do nothing to prevent inter-country spread until mid 2020. Protocols were developed in 2003 during the SARS outbreak, and none were followed.", "upvote_ratio": 28150.0, "sub": "AskScience"}505{"thread_id": "umhb2t", "question": "With the symptoms being so close to the common cold or a flu, wouldn't most doctors have simply assumed that the first patients were suffering from one of those instead?  What made us suspect it was a new virus, and not an existing one?", "comment": "I work in Healthcare. Let me tell you, COVID is nothing like the cold or flu. We had people coming into the hospital being so sick and not recovering no matter what we did for them. We immediately knew something was wrong and that a ton of people were developing this illness, we just didn't know what it was right away. I can recall patients being sick at the end of 2019 and the healthcare team (us) being on edge because they weren't necessarily recovering. Then 2020 rolls around and this new illness is classified as COVID.\n\nEdit: Clarifying", "upvote_ratio": 3640.0, "sub": "AskScience"}506{"thread_id": "umhb2t", "question": "With the symptoms being so close to the common cold or a flu, wouldn't most doctors have simply assumed that the first patients were suffering from one of those instead?  What made us suspect it was a new virus, and not an existing one?", "comment": "It was not really that close to the common cold or the flu. People seem to forget how serious COVID-19 was when it first broke out. Our current situation with the Delta and Omicron, which have a lot lower mortality, has changed our perception of COVID.\n\nSerious cases of COVID required ventilators, which the cold and flu usually don't need. There was also clotting and organ damage. There is also the loss of taste, which is a very strange symptom. They would have noticed these strange symptoms and investigated, especially after autopsies. Then they would have done numerous tests for bacteria, fungi and virus due to the number of patients, and found out about COVID.", "upvote_ratio": 2000.0, "sub": "AskScience"}507{"thread_id": "umhioy", "question": "Mine were Betty Rubble (*The Flintstones*), Mary Ann Summers (*Gilligan's Island*), and Jeannie (*I Dream of Jeannie*).\n\nEdit: I just remembered another early TV crush, Agent 99 on *Get Smart*.", "comment": "The original Batgirl, Yvonne Craig (from the Adam West Batman).", "upvote_ratio": 400.0, "sub": "AskOldPeople"}508{"thread_id": "umhioy", "question": "Mine were Betty Rubble (*The Flintstones*), Mary Ann Summers (*Gilligan's Island*), and Jeannie (*I Dream of Jeannie*).\n\nEdit: I just remembered another early TV crush, Agent 99 on *Get Smart*.", "comment": "The 3 girls skinny dipping in the water tower at the beginning of Petticoat Junction.", "upvote_ratio": 370.0, "sub": "AskOldPeople"}509{"thread_id": "umhioy", "question": "Mine were Betty Rubble (*The Flintstones*), Mary Ann Summers (*Gilligan's Island*), and Jeannie (*I Dream of Jeannie*).\n\nEdit: I just remembered another early TV crush, Agent 99 on *Get Smart*.", "comment": "Keith Partridge (David Cassidy) from \u2018The Partridge Family\u2019 \ud83d\ude0d\u2764\ufe0f", "upvote_ratio": 360.0, "sub": "AskOldPeople"}510{"thread_id": "umhwwc", "question": "I'm currently writing a novel and trying to find (semi-)plausible reasons for how and why future rich people are able to change fundamental characteristics of their own bodies. Those changes would range from eye- or haircolor to changes in hormone production or even changing which parts of the body are able to regenerate and which are not. My limited knowledge makes me think it's indeed not possible but I'm definitely not qualified to make any assumptions which is why I'm asking here!", "comment": "Not with our technological level.\n\nColor change might be possible in future, eg.  by gene editing therapy(eg. Imprinting gene code with virus), assuming that method will be faster than organism autocorrection mechanisms. Even then- it will take time, enough time for old cells to die off specifically speaking\n\nRegeneration of lost body parts would need changes that  would make subject not longer a human. \"Lab\" grown  tissue technically can be transplanted in place of lost one", "upvote_ratio": 80.0, "sub": "AskScience"}511{"thread_id": "umhwwc", "question": "I'm currently writing a novel and trying to find (semi-)plausible reasons for how and why future rich people are able to change fundamental characteristics of their own bodies. Those changes would range from eye- or haircolor to changes in hormone production or even changing which parts of the body are able to regenerate and which are not. My limited knowledge makes me think it's indeed not possible but I'm definitely not qualified to make any assumptions which is why I'm asking here!", "comment": "I can imagine an engineered virus with a crispr protein specifically tailored to the target person's genes to change a trait like that. If normal biology would not replace the cells fast enough I'm sure there's a hormone cocktail that could be locally administered to help. Maybe this is a taxing operation, or maybe they have drugs to help with that?\n\nCould also be interesting if, say, the targeted virus accidentally started to work on a family member who was not supposed to know about some deception, but they weren't getting the localized helper medications so it just takes a really long time to \"reveal\"?", "upvote_ratio": 80.0, "sub": "AskScience"}512{"thread_id": "umhwwc", "question": "I'm currently writing a novel and trying to find (semi-)plausible reasons for how and why future rich people are able to change fundamental characteristics of their own bodies. Those changes would range from eye- or haircolor to changes in hormone production or even changing which parts of the body are able to regenerate and which are not. My limited knowledge makes me think it's indeed not possible but I'm definitely not qualified to make any assumptions which is why I'm asking here!", "comment": "[removed]", "upvote_ratio": 60.0, "sub": "AskScience"}513{"thread_id": "umhysk", "question": "What facts about the United States do foreigners not believe until they come to America?", "comment": "I've encountered many people who underestimate how big it is.  I know some folks from South Korea, whose country is functionally an island (ocean on three sides and a closed border on the fourth).  They can drive from one end of the country to the other in a matter of hours.\n\nThey intellectually knew America was very large, but until they spent hours in a jet it didn't click just how incredibly huge it really is.  Try flying over the southwestern desert regions and realizing \"Holy crap, it just *keeps going*.\"", "upvote_ratio": 12290.0, "sub": "AskAnAmerican"}514{"thread_id": "umhysk", "question": "What facts about the United States do foreigners not believe until they come to America?", "comment": "This might be better addressed to non-Americans. But visitors I've met had a hard time understanding the size of the country, the distances Americans routinely drive, and the lack of good alternatives to driving or flying.", "upvote_ratio": 8950.0, "sub": "AskAnAmerican"}515{"thread_id": "umhysk", "question": "What facts about the United States do foreigners not believe until they come to America?", "comment": "My dad was an immigrant from Britain in the 60s.  All his family is still over there.  So I'll share some things that have mystified my relatives over the years, when they visited.\n\nThe spread-out nature of things, obviously.  Intersections of two four-lane streets seem like parking lots to them.\n\nInsect life.  My cousins were baffled by the winking green lights in the air in the summer, and thought I was messing with them when I told them they were bugs.  I had to catch one and show them.  Some of my relatives have been genuinely freaked out by how LOUD the cicadas and crickets and grasshoppers can get in the evening.  The idea of that density of insects, that they can be loud enough you have to raise your voice to be heard over them, was freaky to them.\n\nThe heat.  They would always arrive excited for warm weather, and then after a couple of days they'd realize there is a difference between warm and HOT.  Fortunately my parents' house had a pool so they could jump in there and recuperate from the high-90s weather.\n\nGuns.  It seemed so weird to them that we would drive down my city's main drag and pass four or five gun stores, or be on the highway and see a huge billboard reading \"GUNS NEXT EXIT.\" I remember my cousin saying \"Who is buying guns so casually that they're on their way to somewhere else and see this billboard, and they're like *oh let's pull off here and get some guns*?\" Or how so many shops and restaurants have signs on the door saying \"Weapons prohibited.\" The fact that we need to *specify that* is crazy to them.\n\nThe free refills thing, and soft drinks coming out of \"taps\" (drinks fountains) baffled my one cousin when we were kids, and as adults he told me he had assumed there were underground pipes for every conceivable soft drink beneath every American town, because he thought of them as taps and that's how water gets to water taps.\n\nWhen we were teenagers I tried to take my cousins camping and caving.  The caving terrified them, and after that they flat-out refused to sleep in a tent in the woods so we had to get a motel room.  I'm not an hardcore outdoorsy guy, but I took it for granted they would enjoy some outdoors like I did.  They did not.  Years later they are still telling people about their crazy American cousin taking them down into the perilous inky black bowels of the earth hahaha.  One of them has a wife, and she was laughing about this family legend, and I was like, \"You know that cave I took them to that they still haven't forgiven me for?  That was where I took my wife on our first date.\" And they all just shook their heads.\n\nCountry poverty.  They have poor people everywhere, but in Europe it's mostly urban I guess, and rural poverty looks different, and more depressing.", "upvote_ratio": 8870.0, "sub": "AskAnAmerican"}516{"thread_id": "umik09", "question": "Why is there no tick prevention for humans? You can buy prevention for dogs that lasts for months without reapplication, but for humans the best we can do is a bug spray that sometimes works.", "comment": "There is a project underway to develop a 'vaccine' to ticks. Normally we don't notice ticks as their bites don't cause an immune reaction. If we can prime the immune system to react to tick bites, then the resulting inflammation and itching would let us know it was there, and allow removal before it had a chance to properly feed and transmit Lyme or similar diseases.\n\nhttps://www.newscientist.com/article/2297648-mrna-vaccine-against-tick-bites-could-help-prevent-lyme-disease/", "upvote_ratio": 45350.0, "sub": "AskScience"}517{"thread_id": "umik09", "question": "Why is there no tick prevention for humans? You can buy prevention for dogs that lasts for months without reapplication, but for humans the best we can do is a bug spray that sometimes works.", "comment": "[removed]", "upvote_ratio": 31750.0, "sub": "AskScience"}518{"thread_id": "umik09", "question": "Why is there no tick prevention for humans? You can buy prevention for dogs that lasts for months without reapplication, but for humans the best we can do is a bug spray that sometimes works.", "comment": "The main thing only touched upon is simply: Humans regularly bathe. The dogs get the chemical into them and it settles on their skin, and that\u2019s that. It will say right on the application notes that any regular swimming or bathing will necessitate earlier reapplication. Imagine bathing every 0.5-2 days for the entire month, with soap. \n\nNot to mention humans change their \u201cfur\u201d daily also which will also carry away some of the chemical.\n\nThis is from the [K9 Advantix II Tick/Flea FAQ](https://ca.mypetandi.com/our-products/advantix/)\n\n>\tBaths can be given as often as once per month without affecting the performance of the product. If more than one bath is given, K9 Advantix\u00aeII should be reapplied after the second bath.\n\nSo basically you get one bathing before the product is no longer effective. So you could do it and just not bathe for a month if you\u2019d want.", "upvote_ratio": 12750.0, "sub": "AskScience"}519{"thread_id": "umkpaf", "question": "When did you realize that Lily Tomlin was married to a lady?", "comment": "I didn\u2019t notice. \n\nAnd now that I know I still don\u2019t care.", "upvote_ratio": 250.0, "sub": "AskOldPeople"}520{"thread_id": "umkpaf", "question": "When did you realize that Lily Tomlin was married to a lady?", "comment": "Just now, from you, OP. Now I have another irrelevant, unsurprising factoid cluttering up my brain. Thanks.", "upvote_ratio": 180.0, "sub": "AskOldPeople"}521{"thread_id": "umkpaf", "question": "When did you realize that Lily Tomlin was married to a lady?", "comment": "Apparently today.", "upvote_ratio": 140.0, "sub": "AskOldPeople"}522{"thread_id": "uml7ef", "question": "What facts do Americans usually not believe about the rest of the world, until they see or experience it for themselves?", "comment": "I wouldn't have guessed that Quebec has a French-language version of American pop country music. But then I strayed into the upper range of the SiriusXM dial.", "upvote_ratio": 3980.0, "sub": "AskAnAmerican"}523{"thread_id": "uml7ef", "question": "What facts do Americans usually not believe about the rest of the world, until they see or experience it for themselves?", "comment": "I didn\u2019t think the Swiss were so crazily rules oriented until I went there and saw a sign with a high heel shoe with a circle and slash through it.\n\nThis was on a mountain ridge trail in the high alps. They felt the need to make sure no one was trying to hike that trail in high heels.\n\nAnother trail had a sign that asked you to keep your children on a leash. It looked just like the ones for dogs but had a symbol for a kid rather than a dog.", "upvote_ratio": 3140.0, "sub": "AskAnAmerican"}524{"thread_id": "uml7ef", "question": "What facts do Americans usually not believe about the rest of the world, until they see or experience it for themselves?", "comment": "The US isn't the most -ist or -phobe country by a long shot.\n\nIt's just one of the countries that actually shine a light on it.", "upvote_ratio": 3010.0, "sub": "AskAnAmerican"}525{"thread_id": "umlyj7", "question": "First love. 1967, Ford Galaxy Police Tin Cruiser. What was yours?", "comment": "1960 Karmann Ghia", "upvote_ratio": 30.0, "sub": "AskOldPeople"}526{"thread_id": "umnbhx", "question": "What star was closest to the Sun 305 million years ago? Is it even possible to predict their positions that far back?", "comment": "Sun [orbits Milky Way every 230 million years. ](https://astronomy.com/magazine/ask-astro/2020/07/in-which-direction-does-the-sun-move-through-the-milky-way)  305 million  / 230 million = 1.3 orbits in the past. \n\n305 million years ago the Sun was surrounded by a group of stars, one of which would have been the closest. [This video shows that nearby stars](https://youtu.be/hvEHnvkABas) orbiting the Milky Way get smeared out into a long arc. \n\n[This article](http://beyondearthlyskies.blogspot.com/2013/04/nearest-stars-past-present-and-future.html?m=1) shows the closest star to Earth is going to change in about 25,000 years. \n\nThese two points suggest to me that astronomers can't determine the closest star to the Sun 305 million years ago.", "upvote_ratio": 90.0, "sub": "AskScience"}527{"thread_id": "umnbhx", "question": "What star was closest to the Sun 305 million years ago? Is it even possible to predict their positions that far back?", "comment": "It's currently impossible to know what the closest star to the Sun was 305 million years ago. It may be possible in many decades, but currently our best information can only tell us the closest stars +/- about 2-3 million years from now.", "upvote_ratio": 40.0, "sub": "AskScience"}528{"thread_id": "umnmhb", "question": "I am working on the following problem regarding RTL notation.\n\nWhat is the effect of the following sequence of RTL instructions? Describe each one individually and state the overall effect of these operations. Note that the notation \\[x\\] means the contents of memory location x.\n\na. \\[5\\] \u2190 2\n\nb. \\[6\\] \u2190 12\n\nc. \\[7\\] \u2190 \\[5\\] + \\[6\\]\n\nd. \\[6\\] \u2190 \\[7\\] + 4\n\ne. \\[5\\] \u2190 \\[\\[5\\] + 4\\]\n\nI understand what is happening in a - d. However the double brackets in e. are confusing me. Is it saying place the contents of memory location 5 are being added to the contents of memory location 4 and stored back into 5? That would make the most sense, only that nothing was ever loaded into \\[4\\]...so that just throws me off a bit..\n\nLike I said I understand everything else. I appreciate any help or direction.\n\nedit: Thank you to everyone that helped!", "comment": ">  Is it saying place the contents of memory location 5 are being added to the contents of memory location 4 and stored back into 5?\n\nNo, that would be [5] \u2190 [5] + [4].\n\nYou can analyze expressions like this by looking at them \"inside-out\". That is:\n\n* What does it mean to evaluate the expression [5]? You're given the definition: it means reading the contents of memory location 5?\n* What does it mean to evaluate the expression [5]+4? It means to add the expression [5] (which you figured out in the previous step) to the *value* 4.\n* What does it mean to evaluate [[5]+4]? I'll leave this one for you.", "upvote_ratio": 40.0, "sub": "AskComputerScience"}529{"thread_id": "umnmhb", "question": "I am working on the following problem regarding RTL notation.\n\nWhat is the effect of the following sequence of RTL instructions? Describe each one individually and state the overall effect of these operations. Note that the notation \\[x\\] means the contents of memory location x.\n\na. \\[5\\] \u2190 2\n\nb. \\[6\\] \u2190 12\n\nc. \\[7\\] \u2190 \\[5\\] + \\[6\\]\n\nd. \\[6\\] \u2190 \\[7\\] + 4\n\ne. \\[5\\] \u2190 \\[\\[5\\] + 4\\]\n\nI understand what is happening in a - d. However the double brackets in e. are confusing me. Is it saying place the contents of memory location 5 are being added to the contents of memory location 4 and stored back into 5? That would make the most sense, only that nothing was ever loaded into \\[4\\]...so that just throws me off a bit..\n\nLike I said I understand everything else. I appreciate any help or direction.\n\nedit: Thank you to everyone that helped!", "comment": "Brackets are denoting memory location.\n\nc is saying that the contents of memory address 7 will contain the result of adding the contents of memory address 5 with the contents of memory address 6.\n\nd is saying that the contents of memory address 6 will contain the result of adding the contents of memory address 7 with the number 4.\n\nNothing is stored in memory address 4.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}530{"thread_id": "umnpdc", "question": "So recently I learned that there are about 1 million people of romani gypsy descent in the U.S. Do they face discrimination like in Europe? Are most people cool with them?\n\nI am just an European and thought it was interesting to know because here racism against them is Jim Crow era style.\n\nThanks for all the replies in advance.", "comment": "Not in any real sense.\n\nThe word \"gypsy\" itself has little real meaning in the United States.", "upvote_ratio": 15180.0, "sub": "AskAnAmerican"}531{"thread_id": "umnpdc", "question": "So recently I learned that there are about 1 million people of romani gypsy descent in the U.S. Do they face discrimination like in Europe? Are most people cool with them?\n\nI am just an European and thought it was interesting to know because here racism against them is Jim Crow era style.\n\nThanks for all the replies in advance.", "comment": "Americans largely don't have a concept of \"gypsies.\" In America, \"traveler\" means something different and is definitely not an ethnic/racial group - it generally means people of all backgrounds who are some type of homeless, and go from place to place. Perhaps some proportion of the roma population in America are \"travelers\" but I don't know. This is not something most people here really think about.", "upvote_ratio": 6790.0, "sub": "AskAnAmerican"}532{"thread_id": "umnpdc", "question": "So recently I learned that there are about 1 million people of romani gypsy descent in the U.S. Do they face discrimination like in Europe? Are most people cool with them?\n\nI am just an European and thought it was interesting to know because here racism against them is Jim Crow era style.\n\nThanks for all the replies in advance.", "comment": "I didn't learn that Gypsy was considered a slur (or even what it actually meant) until I was in my 20s. it's widely used to mean, like, someone who is a free spirit/hippie type (and not in a negative way). \n\nthere's a Lady Gaga song called gypsy that basically refers to \"gypsy life\" as having no plans and being free or whatever. it's a good look into what the word means for most Americans. \n\nso, no, I don't think there's the same kind of discrimination against Romani people here. my guess is that if a Romani person told a random American they are Romani, they'd have to explain what that is.", "upvote_ratio": 5680.0, "sub": "AskAnAmerican"}533{"thread_id": "umo52o", "question": "I\u2019m starting to wonder if there\u2019s any evidence of humans beings purposefully eradicating another species, purely for the benefit of our survival. I know we\u2019ve already made efforts to eliminate the Guinea worm and are pretty close on that end, but I\u2019m wondering if there are other species that used to exist but we had to kill off because it was too dangerous to co-habilitate with.", "comment": "The smallpox virus is as good as extinct.     \nThere are still some samples of it [kept in Russian and USA labs for research purposes.](https://www.niaid.nih.gov/diseases-conditions/smallpox)\n\nWe are working on making polio extinct. \n\nMy vote goes to making bedbugs extinct next!\n\nEdit: \u2026 and pubic lice are becoming rare in the West due to the fashion for shaving pubic hair, but I consider that to be a happy side-effect of fashion and not intentional.", "upvote_ratio": 90.0, "sub": "AskScience"}534{"thread_id": "umo52o", "question": "I\u2019m starting to wonder if there\u2019s any evidence of humans beings purposefully eradicating another species, purely for the benefit of our survival. I know we\u2019ve already made efforts to eliminate the Guinea worm and are pretty close on that end, but I\u2019m wondering if there are other species that used to exist but we had to kill off because it was too dangerous to co-habilitate with.", "comment": "This isn\u2019t a proper answer because the species has survived, but it\u2019s my impression that we almost did this to the American bison. \n\nI remember learning in social studies classes ages ago that the company or companies that built the transcontinental railroad hired hunters to slaughter as many of them possible. (\u201cBuffalo Bill, Buffalo Bill, / Never missed and never will / And the company pays his buffalo bill.\u201d) \n\nI seem to remember that the reason was two-fold. I seem to remember that they thought the vast migrating herds might have caused problems with the building and maintenance of the tracks. Also\u2014and perhaps more important\u2014they were the primary resource native groups on the Great Plains relied on, so slaughtering them was basically an indirect form of genocide, which the railroad companies and the settlers and the US government considered desirable. So it was basically an example of trying to eradicate another species as a way of eradicating a group of people.\n\nI have read that the population of bison collapsed from tens of millions to less than a thousand in the late 1800s, so that was quite close to total extinction. It\u2019s my understanding that the species only survived because aggressive conservation measures were undertaken at that point.", "upvote_ratio": 50.0, "sub": "AskScience"}535{"thread_id": "umo52o", "question": "I\u2019m starting to wonder if there\u2019s any evidence of humans beings purposefully eradicating another species, purely for the benefit of our survival. I know we\u2019ve already made efforts to eliminate the Guinea worm and are pretty close on that end, but I\u2019m wondering if there are other species that used to exist but we had to kill off because it was too dangerous to co-habilitate with.", "comment": "[removed]", "upvote_ratio": 50.0, "sub": "AskScience"}536{"thread_id": "umostn", "question": "As the title explains I'm looking for a plotting library for C++ that is simple to use and that can be compiled on windows with the MinGW g++ compiler. I have been looking for a while but can't find anything that compiles correctly. Are there any go-to libraries that you guys use that are simple to start using?", "comment": "> Are there any go-to libraries that you guys use that are simple to start using?\n\nPython and matplotlib.\n\nI write my simulation code in C++, write out datafiles, load them in python and then plot there. \n\nDo you really need plotting capability in C++? \n\nUsually you write C++ because you need the speed and usually your programs take quite a while to run. So you will have to store the results anyways, as you wouldnt want to rerun the entire thing just because an axis label is wrong. Hence you might as well use the frankly superior matplotlib.", "upvote_ratio": 110.0, "sub": "cpp_questions"}537{"thread_id": "umostn", "question": "As the title explains I'm looking for a plotting library for C++ that is simple to use and that can be compiled on windows with the MinGW g++ compiler. I have been looking for a while but can't find anything that compiles correctly. Are there any go-to libraries that you guys use that are simple to start using?", "comment": "Maybe Matplot++ is the solution. You can check more info in https://github.com/alandefreitas/matplotplusplus", "upvote_ratio": 50.0, "sub": "cpp_questions"}538{"thread_id": "umostn", "question": "As the title explains I'm looking for a plotting library for C++ that is simple to use and that can be compiled on windows with the MinGW g++ compiler. I have been looking for a while but can't find anything that compiles correctly. Are there any go-to libraries that you guys use that are simple to start using?", "comment": "I'd recommend just writing the data out to file and using gnuplot. Its scripting language is a little quirky but since it's a domain-specific language designed for plotting it'll feel more natural than anything else. Plus with some tweaking the output looks really good.", "upvote_ratio": 30.0, "sub": "cpp_questions"}539{"thread_id": "umpirv", "question": "Context: I'm a software engineer with about 10 years of experience, all in higher-level languages (C#, Scala, Python, Typescript). I learned enough C to wrap my head around the C memory model. But parts of C++ memory management are still throwing me for a loop. Specifically, I'm finding it *very* hard to figure out when constructors are called implicitly, and particularly when move constructors are called implicitly.\n\nSo Explain it Like I'm Five: how to move constructors work, when and where are they called implicitly, and what should a correctly written move constructor do?", "comment": "First note that all of this also applies to the distinction between copy- and move-assignment operators.\n\n> how to move constructors work,\n\nDepends entirely how you define them. There is nothing in C++ that forces you to define a move constructor. You can get away with just a copy constructor (and maybe a copy assignment operator).\n\nThat said, the core point on why we have copy vs move comes from an intersection of ownership and object lifetimes.\n\nA class may own some resource external to it, e.g. a  `std::string` owns a dynamically allocated array that is external to it, which is managed through the `string` object. \n\nTo ensure consistency, if you copy the string, then you want the array to be copied, meaning a new allocation would happen. But sometimes the copy is undesired. For a function parameter you could pass by reference, but that doesnt always apply. That is why we have move semantics. To pass ownership of some resource owned by one object into another object.\n\n> when and where are they called implicitly\n\nRarely.  Most of your objects will have a name or some way to reference them(e.g. an index into an array), meaning they are all l-values leading to copy constructor calls.\n\nYou only move from an object when you know that you wont need it anymore. Generally the language does not make that assumption (even though it may be able to prove that you dont use an object anymore).\n\nMove-assignment operators are probably more commonly implicitly invoked:\n\n    vector<int> f()\n    {\n        return { 0, 1, 2, 3 };\n    }\n\n    vector<int> vec = f(); //gets entirely ellided, with no special constructor called.\n    vec = f(); //does move assignment.\n\n> and what should a correctly written move constructor do?\n\nIt should move the ownership from one objec to another and leave the moved-from object in at least a valid-to-destroy state. It is however usually advised to leave the moved-from object in the same astats as a default constructed object.\n\nWhat this means in practice of course depends on your type.\n\nConsider\n\n    struct my_string\n    {\n       char* data = nullptr;\n\n       // ... loads of cool code to make this thing useful ...\n\n       my_string( my_string&& other ) noexcept \n          : data( std::exchange( other.data, nullptr ) ) \n       { }\n\n       ~my_string()\n       {\n           delete[] data;\n       }\n    };\n\nSo the move constructor does two things:\n\n1. It takes the pointer that is originally in `other` into its own internal pointer. This way its \"taking ownership\"\n1. It sets `other.data` to `nullptr`. That way when `other` is destroyed, it doesnt delete the buffer we took ownership of.", "upvote_ratio": 60.0, "sub": "cpp_questions"}540{"thread_id": "umpirv", "question": "Context: I'm a software engineer with about 10 years of experience, all in higher-level languages (C#, Scala, Python, Typescript). I learned enough C to wrap my head around the C memory model. But parts of C++ memory management are still throwing me for a loop. Specifically, I'm finding it *very* hard to figure out when constructors are called implicitly, and particularly when move constructors are called implicitly.\n\nSo Explain it Like I'm Five: how to move constructors work, when and where are they called implicitly, and what should a correctly written move constructor do?", "comment": "https://www.youtube.com/watch?v=Bt3zcJZIalk", "upvote_ratio": 40.0, "sub": "cpp_questions"}541{"thread_id": "umqweo", "question": "For a template class `A`I can do template instantiation like this `template class MyClass<int>` and put into a cpp file. How would do this if I have templated function `A::foo` as shown below?\n\n     void A {\n            template<typename T>\n            //edit: made typo and didn't include arguments\n            void foo(T t);\n     };\n\nOkay figured it out:\n\n    template A::foo(int);", "comment": "template void A::foo<int>();\n\nAfter your edit,  as you deduced\n\ntemplate A::foo(int);\n\nor\n\ntemplate A::foo<int>(int);", "upvote_ratio": 30.0, "sub": "cpp_questions"}542{"thread_id": "umrg1y", "question": "Wikipedia says that it's pending, and that there are a bit of divergence on wether or not to declare it extinct. Why is that?", "comment": "Congaree National Park is a vast area near where I live that is presumed to be one place the Ivory-Billed woodpecker might be. Friends of mine that are interested in the champion trees of the park talk about four-day expeditions through the swampland, and say that it could very well exist there, but it\u2019s so hard to navigate some areas. \n\nThere\u2019s a video out there of a potential sighting, it\u2019s incredibly grainy and likely a decade old at this point. This is 100% hearsay, but I think it strikes at why they aren\u2019t entirely considered extinct. \n\nHopefully we can find one in the swamps soon, because they are truly beautiful birds (although I have only seen pictures). They have plenty of hiding places in the park, haha", "upvote_ratio": 50.0, "sub": "AskScience"}543{"thread_id": "umrg1y", "question": "Wikipedia says that it's pending, and that there are a bit of divergence on wether or not to declare it extinct. Why is that?", "comment": "US Fish and Wildlife declared it extinct last fall.\n\nHowever.\n\nThere is a [pre-published journal article](https://www.discoverwildlife.com/news/new-paper-suggests-that-ivory-billed-woodpeckers-still-live-on/) floating around, recently, that claims to have video evidence of Ivory-Billed in a remote Louisiana forest. We will have to wait on the authors and journal process to see what this new evidence is.", "upvote_ratio": 50.0, "sub": "AskScience"}544{"thread_id": "ums6bd", "question": "The [video](https://www.youtube.com/watch?v=73uATsa8y5Y).\n\nAlso, do you, as natives, have some problems with understanding some specific dialects/accents?", "comment": "I definitely couldn't figure out all the words, but it's partially because I'm not really used to listening to Scottish accents. I've found that the more I hear someone speaking with a particular accent, the easier it is for me to understand other people with the same accent.", "upvote_ratio": 490.0, "sub": "AskAnAmerican"}545{"thread_id": "ums6bd", "question": "The [video](https://www.youtube.com/watch?v=73uATsa8y5Y).\n\nAlso, do you, as natives, have some problems with understanding some specific dialects/accents?", "comment": "Here's what I got with the first 30 seconds or so, with no captions (Scout's honor):\n\n(\"Kevin, what's your name?\") \"My name's Kevin Patterson, and I'm a guide at \\[Something something\\]. We're standing here, down in the Borders, and we're just outside of Melrose, which is a famous town. Over to the back of us here, we have the \\[no idea\\], one of the most famous landmarks in the Borders, it's three hills. And the myth is that Merlin the Magician split one hill into three. At the left, the two hills at the back of us, which you can see...\"\n\n\\[Something about how if they're covered in fog/clouds, you won't be getting good weather. He then describes that he's a guide on the River Tweed.\\]\n\nI don't see doing all 4:35, but does that give you a rough idea of what got through?", "upvote_ratio": 370.0, "sub": "AskAnAmerican"}546{"thread_id": "ums6bd", "question": "The [video](https://www.youtube.com/watch?v=73uATsa8y5Y).\n\nAlso, do you, as natives, have some problems with understanding some specific dialects/accents?", "comment": "He speaks a bit fast, but I can understand him.  His accent isn't the problem, it's the speed and enunciation.  \n\nIs the interviewer Southern?  The guy asking the questions sounds like he could be from Tennessee.", "upvote_ratio": 280.0, "sub": "AskAnAmerican"}547{"thread_id": "ums8uw", "question": "Can anyone correct my understanding of the two. From what I can see associated functions are functions that don't have self as a parameter and methods are the ones which do? Is that correct or\n\nall functions defined within an imp block are associated functions even the methods with self parameter??", "comment": "Your second definition is correct. See the [relevant section](https://doc.rust-lang.org/book/ch05-03-method-syntax.html#associated-functions) of the rust book. All functions defined on a type in an `impl` block are associated functions as they are associated with a specific type. Methods are simply associated functions with a receiver of `self`, `&self`, `&mut self`, `self: Box<Self>` etc. and can be called with the [dot operator](https://doc.rust-lang.org/nomicon/dot-operator.html) as `foo.bar()` rather  than just `Foo::bar()`.", "upvote_ratio": 70.0, "sub": "LearnRust"}548{"thread_id": "umsfya", "question": "no i do not have obsession with modern c++, BUT i have a project where i have to use every possible way to make it as modern as it can get.\n\ni worked with old c like apis, and i worked with std::11 supported systems, but not with \"ultra modern\"\n\nexample:\n\n\\- no raw pointer, only smart ones.  \n\\- lambdas everywhere  \n\\- thing what can be done with std::11,14,17,20 so for example no int arr\\[10\\] -> i use vector.\n\nmy question, can you please help me with examples?\n\nfor example what can i change #define MY\\_CONST\\_STRING \"my\\_const\\_string\"?  \nshould i use constexpr std::string\\_view{\"my\\_const\\_string\"}?", "comment": "Using features for the same of it can lead to pretty bad code.\n\nThere is nothing wrong with a raw pointer (as long as its not owning and couldnt be a reference instead).\n\nThere is nothing wrong with plain functions (even though a lambda might enable better optimizations).\n\nFor a list of new and old features as well as their support status, refer to https://en.cppreference.com/w/cpp/compiler_support", "upvote_ratio": 240.0, "sub": "cpp_questions"}549{"thread_id": "umsfya", "question": "no i do not have obsession with modern c++, BUT i have a project where i have to use every possible way to make it as modern as it can get.\n\ni worked with old c like apis, and i worked with std::11 supported systems, but not with \"ultra modern\"\n\nexample:\n\n\\- no raw pointer, only smart ones.  \n\\- lambdas everywhere  \n\\- thing what can be done with std::11,14,17,20 so for example no int arr\\[10\\] -> i use vector.\n\nmy question, can you please help me with examples?\n\nfor example what can i change #define MY\\_CONST\\_STRING \"my\\_const\\_string\"?  \nshould i use constexpr std::string\\_view{\"my\\_const\\_string\"}?", "comment": "Lambdas and smart pointers are 20 years old. Hardly \"modern\". Also, depending what you mean with \"lambdas everywhere\", that's not modern, that's just a bad idea. \n\nThis is weird request, but what you probably want is to go to C++23 draft, check what's implemented and then go back using the highlights. The `const(init,eval,expr)` keywords, concepts, contracts (?), spaceship. fmt, ranges etc.", "upvote_ratio": 190.0, "sub": "cpp_questions"}550{"thread_id": "umsfya", "question": "no i do not have obsession with modern c++, BUT i have a project where i have to use every possible way to make it as modern as it can get.\n\ni worked with old c like apis, and i worked with std::11 supported systems, but not with \"ultra modern\"\n\nexample:\n\n\\- no raw pointer, only smart ones.  \n\\- lambdas everywhere  \n\\- thing what can be done with std::11,14,17,20 so for example no int arr\\[10\\] -> i use vector.\n\nmy question, can you please help me with examples?\n\nfor example what can i change #define MY\\_CONST\\_STRING \"my\\_const\\_string\"?  \nshould i use constexpr std::string\\_view{\"my\\_const\\_string\"}?", "comment": "Make the entire library constexpr.\n\nNever take an exact type as a parameter, template every constructor and function argument and use concepts to constrain them.\n\nMake sure that a noexcept version of every function, constructor, operator, etc is possible so that you don't have to pay for what you don't want to use.\n\nEmbrace transactional programming techniques to make your code and your user's code as exception-resilient as possible (but not in noexcept call paths, as it creates unnecessary runtime costs)\n\nInheritance by composition and polymorphism by type erasure and templatization only.\n\nWherever SIMD vectorization is possible, make it happen.\n\nEvery object that internally allocates should take as a template argument a type that is constrained by a concept to match the public API of pmr::memory_resource except the requirements that functions are virtual (or better yet, the composable allocator API that Andrei Alexandrescu recommended in his 2015 cppcon talk about allocators: see https://github.com/lukaszlaszko/allocators )\n\nDon't forget to aggressively support coroutines.", "upvote_ratio": 110.0, "sub": "cpp_questions"}551{"thread_id": "umsvcb", "question": "Did you cohabitate before marriage?", "comment": "Born in 67. Never thought about it.  Lived with both my ex wives before marriage. Apparently I'm a shitty husband or ignore red flags.  My guess is both. \n\nMy parents were born in the late 30's. They both lived with partners after they were divorced.  I think it's been pretty normal since the late sixties unless you grew up in a very conservative area.", "upvote_ratio": 770.0, "sub": "AskOldPeople"}552{"thread_id": "umsvcb", "question": "Did you cohabitate before marriage?", "comment": "I wouldn't marry someone I hadn't lived with for at least two years  I also wouldn't live with someone unless marriage was in the future. You learn a lot about someone when you live with them. \n\nWhen I was growing up, I'm 55, it was fairly common to cohabitate before marriage.", "upvote_ratio": 540.0, "sub": "AskOldPeople"}553{"thread_id": "umsvcb", "question": "Did you cohabitate before marriage?", "comment": "You\u2019re dumb if you don\u2019t. Bought our first house before we were married, lived together a while before that. Never knew anyone that really frowned on it", "upvote_ratio": 480.0, "sub": "AskOldPeople"}554{"thread_id": "umtasc", "question": "Is Computer Science considered Engineering even though there isn't technically a governing body for it?", "comment": "Computer Science (especially theoretical computer science) is sometimes classified more as a branch of mathematics.\n\nMakes more sense to talk about engineering in terms of software development. A lot of software developers hold a computer science degree, which I think is where the overlap is. In many places, they're commonly called \"software engineers\", but this sometimes upsets licensed Engineers, regulatory boards, etc. I'm not sure of the current state, legally-speaking, in many places. I found [an announcement](https://ncees.org/ncees-discontinuing-pe-software-engineering-exam/) that the National Council of Examiners for Engineering and Surveying was discontinuing their PE exam for Software Engineering after the 2019 session, due to lack of interest.", "upvote_ratio": 60.0, "sub": "AskComputerScience"}555{"thread_id": "umtasc", "question": "Is Computer Science considered Engineering even though there isn't technically a governing body for it?", "comment": "It started in Mathematics.", "upvote_ratio": 40.0, "sub": "AskComputerScience"}556{"thread_id": "umvae3", "question": "Hi there! I'm a software engineer (25 years old), developing apps using Flutter. I like it, there are many cool aspects but a great piece of my heart is C++ lover and I try to keep studying it. I bought \"The C++ programming language\" by Stroustrup, I'm half way right now and it explains a lot of things but I think I need to read it more times. Meanwhile I try to code in C++ what my brain can imagine, for example I'm writing a repository on GitHub composed by many algorithms all written in C++ where I try to use all my new knowledge but I feel that isn't enough.\n\nI would like to make desktop apps, work with DBs...But if I don't have a specific job to do I feel like this is something but isn't enough to really dirt my hands, furthermore I have already seen these stuffs, now I would like to know and do something more that Dart (or other high level languages) can't allow me to do (use pointers for example).\n\nWith Flutter the beginning was easier for me because there are many discord servers, videos...I mean, make apps with it is also intuitive because we use apps daily but C++ is like something that you don't see but it's there and you can do so many things that find the right one to start could be very hard.\n\nThat's why I'm here, do you have any suggestion on what I could do to improve my skills in a serious manner? I can join projects to help people, I would be very happy to join a team and meet new people with my same interests so we can grow together.", "comment": "Do some projects, try some code challenges in c++, try fixing a bug in some open source software.", "upvote_ratio": 40.0, "sub": "cpp_questions"}557{"thread_id": "umvae3", "question": "Hi there! I'm a software engineer (25 years old), developing apps using Flutter. I like it, there are many cool aspects but a great piece of my heart is C++ lover and I try to keep studying it. I bought \"The C++ programming language\" by Stroustrup, I'm half way right now and it explains a lot of things but I think I need to read it more times. Meanwhile I try to code in C++ what my brain can imagine, for example I'm writing a repository on GitHub composed by many algorithms all written in C++ where I try to use all my new knowledge but I feel that isn't enough.\n\nI would like to make desktop apps, work with DBs...But if I don't have a specific job to do I feel like this is something but isn't enough to really dirt my hands, furthermore I have already seen these stuffs, now I would like to know and do something more that Dart (or other high level languages) can't allow me to do (use pointers for example).\n\nWith Flutter the beginning was easier for me because there are many discord servers, videos...I mean, make apps with it is also intuitive because we use apps daily but C++ is like something that you don't see but it's there and you can do so many things that find the right one to start could be very hard.\n\nThat's why I'm here, do you have any suggestion on what I could do to improve my skills in a serious manner? I can join projects to help people, I would be very happy to join a team and meet new people with my same interests so we can grow together.", "comment": "Just code. Build a desktop music file organizer. Or build a http server, or build a messaging app. Just code.", "upvote_ratio": 40.0, "sub": "cpp_questions"}558{"thread_id": "umvjq4", "question": "Right now I'm riding on \"Think you used enough dynamite there, Butch?\"", "comment": "Gentlemen, you can't fight in here! This is the War Room!", "upvote_ratio": 200.0, "sub": "AskOldPeople"}559{"thread_id": "umvjq4", "question": "Right now I'm riding on \"Think you used enough dynamite there, Butch?\"", "comment": "\"What we're dealing with here is a complete lack of respect for the law.\"", "upvote_ratio": 100.0, "sub": "AskOldPeople"}560{"thread_id": "umvjq4", "question": "Right now I'm riding on \"Think you used enough dynamite there, Butch?\"", "comment": "[\"could be raining\"](https://www.youtube.com/watch?v=mC4VflOayBw)\n\n*Young Frankenstein (1974)*", "upvote_ratio": 90.0, "sub": "AskOldPeople"}561{"thread_id": "umvkle", "question": "I've been on diets since I was 12. I understand the importance of being at a healthy weight, but for hell's sake it's getting harder and harder to lose weight as I age (I'm female). Did you give up or do you continue to work at being your best self instead of eating all of the things?", "comment": "Never decided *that*. \n\nI watched my dad and my uncle and my mom all get fat when they hit their 40s. I vowed not to let that happen and so far so good. Portion sizes, what you bring into the house (they were avid pop, ice cream, chips kind of people) and what you use as cooking oil are important. Also movement and activity. My grandfather was my size and weight all his life and I intend on walking in his footsteps. Still use a pushmower to cut my lawn, still do a big veg garden, still go for a mile walk every night and yoga before bed. Zero snacks is a biggie.", "upvote_ratio": 600.0, "sub": "AskOldPeople"}562{"thread_id": "umvkle", "question": "I've been on diets since I was 12. I understand the importance of being at a healthy weight, but for hell's sake it's getting harder and harder to lose weight as I age (I'm female). Did you give up or do you continue to work at being your best self instead of eating all of the things?", "comment": "I'm the opposite.  I've been fat most of my life and never put priority on getting into shape, but getting closer to retirement made me kick things into gear.  What's the point of all the retirement money I've been saving if I'm not healthy enough to enjoy it, y'know?  I'm in my late forties and lost 50 pounds in the past year with this motivation.", "upvote_ratio": 390.0, "sub": "AskOldPeople"}563{"thread_id": "umvkle", "question": "I've been on diets since I was 12. I understand the importance of being at a healthy weight, but for hell's sake it's getting harder and harder to lose weight as I age (I'm female). Did you give up or do you continue to work at being your best self instead of eating all of the things?", "comment": "Eat all the things.  Gave up this year. 52.", "upvote_ratio": 340.0, "sub": "AskOldPeople"}564{"thread_id": "umvm1o", "question": "can someone help me with some <graphics.h> fonctions in c++ ,thank you", "comment": "`<graphics.h>` is a museum piece now. How about something non-ancient like SFML.", "upvote_ratio": 110.0, "sub": "cpp_questions"}565{"thread_id": "umvyo9", "question": "Background: I've got an abscessed tooth right now, and in addition to antibiotics, my dentist prescribed T3s for pain management.\n\nIt suddenly occurred to me that across two countries, three cities, five dentists, and ~50 years, I have NEVER been given any other painkiller prescription.\n\nFor non-dental surgery I've had a wide gamut of painkillers: T3, Oxycodone, Naproxen, and a whole pile of others. But for dental work, it's Tylenol 3, only and exclusively.\n\nIs there something about it that is particularly well-suited for dental work, or is it more a case of tradition?\n\n(Aside: Ibuprofen is currently working far better for my pain than the T3s, presumably because it's reducing inflammation.)", "comment": "I am in dental school and we were just talking about this today.  Atleast in the USA, 10 or so years ago dentists were among the the highest over prescribers on narcotics aka opium derived pain killers such as hydrocodone.  Dentists were an easy target for narcotic seekers, especially young dentists who just graduated and did t know any better.  According to our professor.\n\nThere have been studies done that show most dental work only requires Tylenol or Ibuprofen for dental work.  Ibuprofen when there is inflammation.  T3 w/ codeine the one that is still prescribed sometimes otherwise our school does not prescribe any other narcotics for dental work. And that is from the lead oral surgeon professor who deals with the cases that theoretically should have the most possible pain.", "upvote_ratio": 240.0, "sub": "AskScience"}566{"thread_id": "umvyo9", "question": "Background: I've got an abscessed tooth right now, and in addition to antibiotics, my dentist prescribed T3s for pain management.\n\nIt suddenly occurred to me that across two countries, three cities, five dentists, and ~50 years, I have NEVER been given any other painkiller prescription.\n\nFor non-dental surgery I've had a wide gamut of painkillers: T3, Oxycodone, Naproxen, and a whole pile of others. But for dental work, it's Tylenol 3, only and exclusively.\n\nIs there something about it that is particularly well-suited for dental work, or is it more a case of tradition?\n\n(Aside: Ibuprofen is currently working far better for my pain than the T3s, presumably because it's reducing inflammation.)", "comment": "Alternating acetaminophen and ibuprofen every three hours is commonly advised for dental pain at the dental school clinic in my area. I'd expect them to be on top of best practices. \n\nhttps://www.ada.org/resources/research/science-and-research-institute/oral-health-topics/oral-analgesics-for-acute-dental-pain\n\n>A recent systematic overview in JADA including data on over 58,000 patients following third-molar extractions found that when comparing the pain-reducing efficacy of NSAIDs and opioid analgesics, the combination of 400 mg ibuprofen with 1,000 mg acetaminophen was more effective than any opioid-containing regimen and was also associated with a lower risk of adverse events.", "upvote_ratio": 70.0, "sub": "AskScience"}567{"thread_id": "umvyo9", "question": "Background: I've got an abscessed tooth right now, and in addition to antibiotics, my dentist prescribed T3s for pain management.\n\nIt suddenly occurred to me that across two countries, three cities, five dentists, and ~50 years, I have NEVER been given any other painkiller prescription.\n\nFor non-dental surgery I've had a wide gamut of painkillers: T3, Oxycodone, Naproxen, and a whole pile of others. But for dental work, it's Tylenol 3, only and exclusively.\n\nIs there something about it that is particularly well-suited for dental work, or is it more a case of tradition?\n\n(Aside: Ibuprofen is currently working far better for my pain than the T3s, presumably because it's reducing inflammation.)", "comment": "Studies (Moore et al.) show that staggering ibuprofen and Tylenol is actually the most effective course for dental pain, such as after an extraction. If you\u2019re in pain because of an infection - which is very often the case, an antibiotic is often what will actually manage the pain much more effectively, as it is actually helping what is causing the pain. \n\nI see dozens of emergency walk ins / toothaches a week, and I maybe write for controlled substances less than 5 times a week. What I tell patients is that narcotics don\u2019t really do much for dental pain, they more help you sleep / make the acute phase more manageable if it\u2019s something that is just crazy painful - but there are better ways to manage it.\n\nPatients regularly tell me that ibuprofen is more effective than Norco for their dental pain.\n\nWhen I was in school we would routinely give 20+ Vicodin for an easy tooth extraction. The reasoning? We were told that it was what patients expected and if we didn\u2019t give them out in private practice patients would be upset / not come back because they thought we were mean. And then the opioid epidemic hit and it\u2019s now the total opposite , but honestly it\u2019s for the best. I see so many patients that are in recovery, and many of them had their first exposure to drugs from a dentist when they got their wisdom teeth taken out.", "upvote_ratio": 40.0, "sub": "AskScience"}568{"thread_id": "umvzho", "question": "Did anyone ride a motorcycle during those years and if so what year, make and model?  I had a friend who had a restored Triumph Tiger and it was a cool bike.", "comment": "I rode a Tiger a few times. Liked it. I was heavy into MC between about 63 and 68. Road raced up and down the West Coast, traveled with a Suzuki dealership that also sold Triumphs, and whoa, did we ever like the Suzuki better. Japanese bikes were still pretty much disposable at the time, but they were getting as fast as the British bikes in some ways, and the 250cc class was dominating road racing, beating bigger bikes. \n\nMy best bike was a Suzuki X6, AKA T-20, AKA \"Hustler\".  A two-stroke twin with a 6 speed transmission, and slingshot acceleration. Our dealership built one into a full-blown road racer that was competitive at the national level. We won a bunch of trophies, and novice-professional points, and when our probationary period was up, we quit. Serious professional racing required more to win, than we had available to offer. Tons of fun while it lasted. \n\nI've owned several bikes since then, and wouldn't mind one today. I've never been a \"biker\", although I sense that their love of motorcycles is as real as mine. I just don't see the need for it to be an entire way of life. Even though it was for a few years, I looked like a normal norman off the bike.", "upvote_ratio": 60.0, "sub": "AskOldPeople"}569{"thread_id": "umvzho", "question": "Did anyone ride a motorcycle during those years and if so what year, make and model?  I had a friend who had a restored Triumph Tiger and it was a cool bike.", "comment": "I am woman and I used to ride motorcycles but not until 1998.  I'm disabled now mentally and physically and will never ride again, but I used to say that riding a MC was like being on a carnival ride for hours at a time.  My license plate frame says, \"Live to ride.\"", "upvote_ratio": 60.0, "sub": "AskOldPeople"}570{"thread_id": "umvzho", "question": "Did anyone ride a motorcycle during those years and if so what year, make and model?  I had a friend who had a restored Triumph Tiger and it was a cool bike.", "comment": "I had a 1963 Honda 150 ([CA95](https://www.bike-urious.com/baby-dream-1964-honda-ca95-benly/)) in high school (1970).", "upvote_ratio": 50.0, "sub": "AskOldPeople"}571{"thread_id": "umw3ig", "question": "Hi team,\n\nAs the title, any good lightweight c++ local socket library recommendation for embedded Linux for inter process communication?\n\nthanks guys!", "comment": "ZeroMQ for the win!\n\nhttps://zeromq.org/\n\nThey recently introduced new thread safe patterns of scatter/gather and client/server, in addition to the many previous other patterns. (By thread-safe they mean more than one thread can read/write to the same socket.)\n\nIt is ultra-high performance (it was selected as the protocol for the large hadron collider at CERN which deals in tera and peta-byte scale - per day - processing). \n\nWe are talking hundreds of thousands of messages per second.\n\nWhat's better is you can easily switch from in-memory message transfer between threads, to interprocess communication using Unix sockets for IPC, to TCP to scale up your deployments from multi-threaded to multi-process to multi-server deployments simply by changing your urls protocol and addresses and appropriate. Currently supported protocols include tcp, udp, pgm, epgm, inproc and ipc.\n\nFinally, it is ported to many programming languages. Say you want to do some high speed processing in C++, send some data to a python app to do machine learning with TensorFlow, and then return the result to C++ to resume high performance process. With ZeroMQ this becomes very easy. Combine that with a high performance messaging serialization library like Google protocol buffers and now you can weave magical constructs, scaling to hundreds or thousands of nodes.\n\nI have had very good results with both of these technologies on raspberry pi.\n\nHappy coding!\n\n\n/Edit for typos", "upvote_ratio": 60.0, "sub": "cpp_questions"}572{"thread_id": "umw3ig", "question": "Hi team,\n\nAs the title, any good lightweight c++ local socket library recommendation for embedded Linux for inter process communication?\n\nthanks guys!", "comment": "I've found NNG to be high quality, also has less restrictive license. https://nng.nanomsg.org/\n\nZeroMQ is another one.", "upvote_ratio": 30.0, "sub": "cpp_questions"}573{"thread_id": "umw3ig", "question": "Hi team,\n\nAs the title, any good lightweight c++ local socket library recommendation for embedded Linux for inter process communication?\n\nthanks guys!", "comment": "I'd look for some shared memory libraries. Lower overhead than sockets.", "upvote_ratio": 30.0, "sub": "cpp_questions"}574{"thread_id": "umw5mv", "question": "Hi all. I found that on [this webstite](https://www.digitalwelt.org/en/digital-subcultures/scam-baiting-hacking/) there are some words that won't show anything on Google if I copy-paste them (\"Vayne-RaT\" for instance). \n\n[Webpage section with unsearchable words](https://preview.redd.it/rxl4m32qhqy81.png?width=823&format=png&auto=webp&s=f8555f3a6061d9a5ae8a12575b3828613e267b3f)\n\nI've found that actually what is going to the clipboard is a weird formatted string disguised as the normal text, for this I have used a clipboard viewer tool. This is the content that is being sent to the clipboard:\n\n[Clippboard content with weird-formatted words highlighted](https://preview.redd.it/cxn4l3k0iqy81.png?width=821&format=png&auto=webp&s=15a5cd4ac23d5a8a28ee79c374102638ae5410cf)\n\nSo the question is, how did he do that?", "comment": "Looks like he's replacing characters in the strings with ones which look very similar (or identical) in Unicode (vs plain ascii).\n\nFor example:\n\n`CrunchRAT` typed out manually == `43 72 75 6e 63 68 52 41 54`  \nhttps://cyberchef.org/#recipe=To_Hex('Space',0)&input=Q3J1bmNoUkFU\n\n \n\n`\u0421run\u0441hR\u0410\u03a4` copied from his article == `d0 a1 72 75 6e d1 81 68 52 d0 90 ce a4`  \nhttps://cyberchef.org/#recipe=To_Hex('Space',0)&input=0KFydW7RgWhS0JDOpA\n\n \n\nI used CyberChef to pull/identify these (links above)", "upvote_ratio": 100.0, "sub": "AskComputerScience"}575{"thread_id": "umw5mv", "question": "Hi all. I found that on [this webstite](https://www.digitalwelt.org/en/digital-subcultures/scam-baiting-hacking/) there are some words that won't show anything on Google if I copy-paste them (\"Vayne-RaT\" for instance). \n\n[Webpage section with unsearchable words](https://preview.redd.it/rxl4m32qhqy81.png?width=823&format=png&auto=webp&s=f8555f3a6061d9a5ae8a12575b3828613e267b3f)\n\nI've found that actually what is going to the clipboard is a weird formatted string disguised as the normal text, for this I have used a clipboard viewer tool. This is the content that is being sent to the clipboard:\n\n[Clippboard content with weird-formatted words highlighted](https://preview.redd.it/cxn4l3k0iqy81.png?width=821&format=png&auto=webp&s=15a5cd4ac23d5a8a28ee79c374102638ae5410cf)\n\nSo the question is, how did he do that?", "comment": "The way the author did it isn't difficult, etagawesome\n has a great explanation. \n\nThe thing I wonder is *why* the author would do it. It seems like strange wannabe hacker tactics; anyone reading the article could obviously search for the terms, but why would they want to prevent people from searching it in the first place?", "upvote_ratio": 60.0, "sub": "AskComputerScience"}576{"thread_id": "umw5mv", "question": "Hi all. I found that on [this webstite](https://www.digitalwelt.org/en/digital-subcultures/scam-baiting-hacking/) there are some words that won't show anything on Google if I copy-paste them (\"Vayne-RaT\" for instance). \n\n[Webpage section with unsearchable words](https://preview.redd.it/rxl4m32qhqy81.png?width=823&format=png&auto=webp&s=f8555f3a6061d9a5ae8a12575b3828613e267b3f)\n\nI've found that actually what is going to the clipboard is a weird formatted string disguised as the normal text, for this I have used a clipboard viewer tool. This is the content that is being sent to the clipboard:\n\n[Clippboard content with weird-formatted words highlighted](https://preview.redd.it/cxn4l3k0iqy81.png?width=821&format=png&auto=webp&s=15a5cd4ac23d5a8a28ee79c374102638ae5410cf)\n\nSo the question is, how did he do that?", "comment": "whatever technique he used, it doesnt work in firefox, nothing is obfuscated, copy-pasting vayne-rat works\n\nedit:  \n    \n    Feature Policy: Skipping unsupported feature name \u201caccelerometer\u201d. www-widgetapi.js:961:251\n    Feature Policy: Skipping unsupported feature name \u201cautoplay\u201d. www-widgetapi.js:961:251\n    Feature Policy: Skipping unsupported feature name \u201cclipboard-write\u201d. www-widgetapi.js:961:251\n    Feature Policy: Skipping unsupported feature name \u201cencrypted-media\u201d. www-widgetapi.js:961:251\n    Feature Policy: Skipping unsupported feature name \u201cgyroscope\u201d. www-widgetapi.js:961:251\n    Feature Policy: Skipping unsupported feature name \u201cpicture-in-picture\u201d. www-widgetapi.js:961:251\n\nfound that in the console, i see some clipboard-write stuff", "upvote_ratio": 50.0, "sub": "AskComputerScience"}577{"thread_id": "umwxey", "question": "When you make a root beer float, do you put in the ice cream or soda first?", "comment": "Ice cream then soda. If you put the ice cream in after it'll splash.", "upvote_ratio": 1440.0, "sub": "AskAnAmerican"}578{"thread_id": "umwxey", "question": "When you make a root beer float, do you put in the ice cream or soda first?", "comment": "ice cream!", "upvote_ratio": 1340.0, "sub": "AskAnAmerican"}579{"thread_id": "umwxey", "question": "When you make a root beer float, do you put in the ice cream or soda first?", "comment": "Ice cream. Fill the glass. The root beer fills the cracks, and partially solidifies, coating the scoops of ice cream with sweet goodness.", "upvote_ratio": 420.0, "sub": "AskAnAmerican"}580{"thread_id": "umxe7i", "question": "Mine is Sicilian & Eskimo cultures.", "comment": "Yeast. Very versitile. Very underappreciated even among biologists.", "upvote_ratio": 1290.0, "sub": "AskAnAmerican"}581{"thread_id": "umxe7i", "question": "Mine is Sicilian & Eskimo cultures.", "comment": "Kefir. Yogurt cultures get a lot of attention for promoting gut health, but kefir is the top notch probiotic option.", "upvote_ratio": 490.0, "sub": "AskAnAmerican"}582{"thread_id": "umxe7i", "question": "Mine is Sicilian & Eskimo cultures.", "comment": "They all have some good little thing going for them.\n\nBut as a whole, Western Civilization, obviously, whatever its imperfections.  There's just no contest.", "upvote_ratio": 230.0, "sub": "AskAnAmerican"}583{"thread_id": "umxgx4", "question": "I am very new to C++ and programming in general. I don't understand why this is happening. Thank you in advance for any help. I feel very lost.\n\nThe error messages look like this:\n\n`Error C2039 'print': is not a member of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'`\n\nI get an error for every function from student.h when I use it in roster.cpp.\n\nroster.cpp\n\n    #include <iostream>\n    #pragma once\n    #include <ostream>\n    #include \"roster.h\"\n    #include \"student.h\"\n    #include <string>\n    \n    using namespace std;\n    \n    void Roster::classRosterParse(string studentData) {\n    \n    \tsize_t rhs = studentData.find(\",\");\n    \tstring studentID = studentData.substr(0, rhs);\n    \n    \tsize_t lhs = rhs + 1;\n    \trhs = studentData.find(\",\", lhs);\n    \tstring firstName = studentData.substr(lhs, rhs-lhs);\n    \n    \tlhs = rhs + 1;\n    \trhs = studentData.find(\",\", lhs);\n    \tstring lastName = studentData.substr(lhs, rhs - lhs);\n    \n    \tlhs = rhs + 1;\n    \trhs = studentData.find(\",\", lhs);\n    \tint age = stoi(studentData.substr(lhs, rhs - lhs));\n    \n    \tlhs = rhs + 1;\n    \trhs = studentData.find(\",\", lhs);\n    \tint daysInCourse1 = stoi(studentData.substr(lhs, rhs - lhs));\n    \n    \tlhs = rhs + 1;\n    \trhs = studentData.find(\",\", lhs);\n    \tint daysInCourse2 = stoi(studentData.substr(lhs, rhs - lhs));\n    \n    \tlhs = rhs + 1;\n    \trhs = studentData.find(\",\", lhs);\n    \tint daysInCourse3 = stoi(studentData.substr(lhs, rhs - lhs));\n    \n    \tlhs = rhs + 1;\n    \trhs = studentData.find(\",\", lhs);\n    \tstring strDegreeProgram = studentData.substr(lhs, rhs - lhs);\n    \n    \tDegreeProgram degreeProgram = SECURITY;\n    \tif (strDegreeProgram == \"Network\") {\n    \t\tdegreeProgram = DegreeProgram::NETWORK;\n    \t}\n    \telse if (strDegreeProgram == \"Software\") {\n    \t\tdegreeProgram = DegreeProgram::SOFTWARE;\n    \t};\n    };\n    \n    void Roster::printDegree(DegreeProgram degreeProgram) {\n    \tfor (int i = 0; i < Roster::amountOfStudents; i++) {\n    \t\tif (classRosterArray[i]->getDegreeProgram() == degreeProgram) {\n    \t\t\tclassRosterArray[i]->print();\n    \t\t};\n    \t}\n    };\n    \n    void Roster::printInvalidEmail() {\n    \tbool any = false;\n    \t\tfor (int i = 0; i < Roster::amountOfStudents; i++) {\n    \t\t\tstring emailAddress = (classRosterArray[i]->getEmailAddress());\n    \t\t\tif (emailAddress.find(\" \") ||\n    \t\t\t\t!emailAddress.find(\"@\") ||\n    \t\t\t\t!emailAddress.find(\".\")) {\n    \t\t\t\tany = true;\n    \t\t\t\tcout << classRosterArray[i]->getEmailAddress() << endl;\n    \t\t\t};\n    \t\t}\n    \tif (!any)  cout << \"NO INVALID EMAILS\" << endl;\n    };\n    \n    \n    void Roster::printAverageDaysInCourse(string studentID) {\n    \tfor (int i = 0; i < Roster::amountOfStudents; i++) {\n    \t\tcout << (classRosterArray[i]->getDaysInCourse()[0] + classRosterArray[i]->getDaysInCourse()[1] + classRosterArray[i]->getDaysInCourse()[2]) / 3 << endl;\n    \t}\n    };\n    \n    void Roster::addStudentData(string studentID, string firstName, string lastName, string emailAddress, int age,\n    \tint daysInCourse1, int daysInCourse2, int daysInCourse3, DegreeProgram degreeProgram) {\n    \t\tint daysArray[3] = {\n    \t\t\tdaysInCourse1, daysInCourse2, daysInCourse3\n    \t\t};\n    //\t\t\tclassRosterArray[amountOfStudents+1] = new student(studentID, firstName, lastName, emailAddress, age,\n    \t\t//\t\tdaysArray, degreeProgram);\n    };\n    \n    void Roster::removeStudentData(string studentID) {\n    \tfor (int i = 0; i <= amountOfStudents; i++) {\n    \t\tif (classRosterArray[i]->getStudentID() == studentID);\n    \t}\n    };\n    \n    void Roster::printAll() {\n    \tfor (int i = 0; i < Roster::amountOfStudents; i++) {\n    \t\tclassRosterArray[i]->print();\n    \t}\n    };\n    \n    void print();\n    \n\nstudent.h\n\n    #pragma once\n    #include <iostream>\n    #include <iomanip>\n    #include <stdio.h>\n    #include \"degree.h\"\n    using std::string;\n    using std::cout;\n    \n    class student {\n    \n    public:\n    \n    \tstudent();\n    \tstudent(string studentID, string firstName, string lastName, string emailAddress, int age,\n    \t\tint daysInCourse[], DegreeProgram degreeProgram);\n    \t~student();\n    \n    \t//how many classes they were taking\n    \tconst static int totalDays = 3;\n    \t\n    private:\n    \t//defines the format of the information for each student\n    \n    \tstring studentID;\n    \tstring firstName;\n    \tstring lastName;\n    \tstring emailAddress;\n    \tint age = {};\n    \tint daysInCourse[totalDays] = {};\n    \tDegreeProgram degreeProgram = {};\n    \n    public:\n    \t//getters\n    \n    \tstring getStudentID();\n    \tstring getFirstName();\n    \tstring getLastName();\n    \tstring getEmailAddress();\n    \tint getAge();\n    \tint* getDaysInCourse();\n    \tDegreeProgram getDegreeProgram();\n    \n    \t//mutators\n    \n    \tvoid editStudentID(string studentID);\n    \tvoid editFirstName(string firstName);\n    \tvoid editLastName(string lastName);\n    \tvoid editEmailAddress(string emailAddress);\n    \tvoid editAge(int age);\n    \tvoid editDaysInCourse(int daysInCourse[]);\n    \tvoid editDegreeProgram(DegreeProgram degreeProgram);\n    \n    \tvoid print();\n    };\n\nstudent.cpp\n\n    #include <iostream>\n    #include \"student.h\"\n    using std::string;\n    \n    using namespace std;\n    \n    \tconst static int totalDays = 3;\n    \n    \t//getters\n    \tstring student::getStudentID() {\n    \t\treturn studentID;\n    \t};\n    \tstring student::getFirstName() {\n    \t\treturn firstName;\n    \t};\n    \tstring student::getLastName() {\n    \t\treturn lastName;\n    \t};\n    \tstring student::getEmailAddress() {\n    \t\treturn emailAddress;\n    \t};\n    \tint student::getAge() {\n    \t\treturn age;\n    \t};\n    \tint* student::getDaysInCourse() {\n    \t\treturn daysInCourse;\n    \t};\n    \tDegreeProgram student::getDegreeProgram() {\n    \t\treturn degreeProgram;\n    \t};\n    \n    \n    \t//mutators\n    \t//\"this->\" is a pointer that you use when two elements have the same name, use it to link to the class object\n    \tvoid student::editStudentID(string studentID) {\n    \t\tthis->studentID = studentID;\n    \t};\n    \tvoid student::editFirstName(string firstName) {\n    \t\tthis->firstName = firstName;\n    \t};\n    \tvoid student::editLastName(string lastName) {\n    \t\tthis->lastName = lastName;\n    \t};\n    \tvoid student::editEmailAddress(string emailAddress) {\n    \t\tthis->emailAddress = emailAddress;\n    \t};\n    \tvoid student::editAge(int age) {\n    \t\tthis->age = age;\n    \t};\n    \tvoid student::editDaysInCourse(int daysInCourse[]) {\n    \t\tfor (int i = 0; i < totalDays; i++)\n    \t\t\tthis->daysInCourse[i] = daysInCourse[i];\n    \t};\n    \tvoid student::editDegreeProgram(DegreeProgram degreeProgram) {\n    \t\tthis->degreeProgram = degreeProgram;\n    \t};\n    \n    \n    \t//whole record\n    \n    \tvoid student::print() {\n    \t\tstd::cout << getStudentID();\n    \t\tstd::cout << \"First Name:\" << getFirstName();\n    \t\tstd::cout << \"Last Name:\" << getLastName();\n    \t\tstd::cout << \"Email Address:\" << getEmailAddress();\n    \t\tstd::cout << \"Age:\" << getAge();\n    \t\tstd::cout << \"Days In Course:\" << getDaysInCourse();\n    \t\tstd::cout << \"Degree Program:\" << getDegreeProgram();\n    };\n\ndegree.h\n\n    #pragma once\n    #include <iostream>\n    \n    enum DegreeProgram { SECURITY, NETWORK, SOFTWARE };\n\nroster.h\n\n    #pragma once\n    #include <iostream>\n    #include \"student.h\"\n    #include \"degree.h\"\n    using std::string;\n    \n    int amountOfStudents = 5;\n    \n    class Roster {\n    \n    \tstatic const int amountOfStudents = 5;\n    public: \n    \n    \tRoster();\n    \n    \t//null pointer doesn't have to point to an object, just acts as a placeholder that will be replaced later\n    \tstring* classRosterArray[amountOfStudents];\n    \n    \tvoid classRosterParse(string studentData);\n    \tvoid printAll();\n    \tvoid printDegree(DegreeProgram degreeProgram);\n    \tvoid printInvalidEmail();\n    \tvoid printAverageDaysInCourse(string studentID);\n    \tvoid addStudentData(string studentID, string firstName, string lastName, string emailAddress, int age,\n    \t\tint daysInCourse1, int daysInCourse2, int daysInCourse3, DegreeProgram degreeProgram);\n    \tvoid removeStudentData(string studentID);\n    };\n\nmain.cpp\n\n    #include <iostream>\n    #include \"degree.h\"\n    #include \"student.h\"\n    #include \"roster.h\"\n    \n    using namespace std;\n    \n    int main()\n    {\n        const string studentData[] =\n        {\n            \"A1,John,Smith,John1989@gm ail.com,20,30,35,40,SECURITY\",\n            \"A2,Suzan,Erickson,Erickson_1990@gmailcom,19,50,30,40,NETWORK\",\n            \"A3,Jack,Napoli,The_lawyer99yahoo.com,19,20,40,33,SOFTWARE\",\n            \"A4,Erin,Black,Erin.black@comcast.net,22,50,58,40,SECURITY\",\n            \"A5,Trenton,Hallman,Trentonhallman@gmail.cosm,19,30,35,52,SOFTWARE\" \n        };\n    \n    \n        Roster classRoster;\n        {\n            //classRoster.printAll();\n            //for (int i = 0; i < amountOfStudents; i++) {\n            //    classRosterParse(string studentData).studentData[i];\n            //};\n        };\n        return 0;\n    }", "comment": "\n    string* classRosterArray[amountOfStudents];\n\n\nclassRosterArray is an array of pointers to string\n\n     classRosterArray[i]->print();\n\nstd:: string doesn't have a member called `print`", "upvote_ratio": 40.0, "sub": "cpp_questions"}584{"thread_id": "umyimx", "question": "You know how people especially some young people say the dislike modern music/society/style. Were there people who felt the same or because they didn't have internet to compare it to anything they never really felt to complain about it.", "comment": "Interesting question. \n\nI was a kid in the 70s \n\nAdolescent in the 80s \n\nCollege in the 90s\n\nLooking back it never occurred to me the living in the 90s was a blessing and a great time to be alive. At the same time, I was also too young to know if the 80s and 70s were good or bad. I was a kid\u2026you just rode your skateboard and saved paper route money for the new Dead Kennedys record. Life was simple; but I wasn\u2019t an adult with adult perspectives. \n\nLooking back\u2026would you relive the 90s? Abso-fucking-loutley", "upvote_ratio": 180.0, "sub": "AskOldPeople"}585{"thread_id": "umyimx", "question": "You know how people especially some young people say the dislike modern music/society/style. Were there people who felt the same or because they didn't have internet to compare it to anything they never really felt to complain about it.", "comment": "In the 80s I and all my peers thought America, and specifically its youth culture, was as shallow and dumb as it could possibly get. We looked back on the 60s with nostalgia.", "upvote_ratio": 180.0, "sub": "AskOldPeople"}586{"thread_id": "umyimx", "question": "You know how people especially some young people say the dislike modern music/society/style. Were there people who felt the same or because they didn't have internet to compare it to anything they never really felt to complain about it.", "comment": "There was plenty to dislike about both decades, but particularly the 1970s, what with Vietnam, Watergate, stagflation, the oil crisis, high unemployment, high inflation, cities cutting services, high crime -- it was bad. The early 1980s was more of the same, then the economy recovered but we still had the crack epidemic and the AIDS crisis. Plus the whole country took a sharp turn to the right. \n\nMany of the problems of today -- climate change, income disparity, conservative judges, Evangelical Christian control over the Republicans, fear of minorities, militarization of the police, deregulation, abandonment of antitrust law, betrayal of the unions, worship of billionaires -- started in the 1980s. Heck, young Donald Trump began his self-mythologizing in the 1980s. He built Trump Tower in 1983, using his father's political connections to get the project approved.", "upvote_ratio": 110.0, "sub": "AskOldPeople"}587{"thread_id": "umyxn9", "question": "When traveling internationally, when do you decide to exchange your money? Before your trip or after arriving at your destination?", "comment": "In my case, always after arrival. \n \nGet a Schwab high yield checking account. Use it to withdraw cash at the ATM in your destination country. Schwab will reimburse most ATM and conversion fees. So much more cost-effective than getting foreign money from your bank stateside, or at a foreign currency exchange abroad. \n \nHeck, even using your debit card from your regular bank is still more cost-effective than walking into your bank or using an exchange kiosk. But you probably won't get your ATM fees reimbursed like with Schwab.", "upvote_ratio": 990.0, "sub": "AskAnAmerican"}588{"thread_id": "umyxn9", "question": "When traveling internationally, when do you decide to exchange your money? Before your trip or after arriving at your destination?", "comment": "I get the local currency from an ATM there. Pulling directly from the ATM gives you the best exchange rate\n\nEdit: a few more tips\n\n-exchange desks/kiosks will always have a worse conversion rate than the ATM so they can make money, ATMs will use the true rate\n\n-get a debit card that reimburses ATM fees, mine does $20 a month so I rarely pay these when traveling\n\n-bring some USD with you that can be converted at an exchange just in case you can't immediately get to an ATM but this should be your reserve\n\n-get a credit card with no foreign transaction fees and pay with this as much as you can. In my experience Visa > Mastercard > Amex in terms of what is accepted more abroad\n\n-whenever you pay with card, always choose to pay in the local currency. Similar to using the ATM, when you pay in the local currency the bank will do the conversion to USD using the true rate. If you choose to pay in USD, the vendor gets to decide what the conversion rate is (usually says on the machine) and it will almost always be worse than the true rate", "upvote_ratio": 780.0, "sub": "AskAnAmerican"}589{"thread_id": "umyxn9", "question": "When traveling internationally, when do you decide to exchange your money? Before your trip or after arriving at your destination?", "comment": "[deleted]", "upvote_ratio": 610.0, "sub": "AskAnAmerican"}590{"thread_id": "un1nhe", "question": "https://mars.nasa.gov/raw_images/1064629/\n\nPicture that has people already racing to conclusions about Aliens.", "comment": "This looks like a chunk of rock has weathered/fallen out between the intersection of two [joints](https://en.wikipedia.org/wiki/Joint_%28geology%29), i.e., two Mode I (extensional) fractures. If you look at the point at the top of the \"door\" and then beyond onto the outcrop surface above it, you can see the continuation of these fractures (and where they intersect along that weathered surface, further back into the image). Joints are extremely common on Earth and form through a variety of mechanisms. If they are joints as opposed to shear fractures (i.e., Mode II or Mode III, it's hard to tell from a photo like this, but I'd still bet joints though in reality, a conjugate set of shear fractures would give you the same end result), the expectation is that they would form parallel to the direction of maximum stress and in a condition where tensile fractures are possible. This typically means either that they form in the very shallow subsurface (where confining pressure is low enough to not preclude fractures forming in the tensile regime) or in the presence of sufficiently high pore fluid pressure to allow tensile fractures to still form (for any of you [Mohr circle](https://en.wikipedia.org/wiki/Mohr's_circle) fans out there, this implies that the pore fluid pressure is sufficient to shift the minimum principal stress into the tensile regime but that differential stress is still low enough to intersect the failure envelope in the tensile regime). It's also extremely common for multiple sets (where a set implies a group of semi-evenly spaced joints with a common orientation) of joints to form and for blocks of rock defined by these intersections to weather out of an outcrop surface, leaving behind angular crevices, not unlike this feature. So yeah, there are probably millions upon millions of similar rock faces on Earth that if photographed from a particular angle with the light right conditions would appear to form a \"door way\" like this.", "upvote_ratio": 750.0, "sub": "AskScience"}591{"thread_id": "un21dy", "question": "I really look forward to that.", "comment": "Some time after it is implemented in the three most common compilers.", "upvote_ratio": 290.0, "sub": "cpp_questions"}592{"thread_id": "un21dy", "question": "I really look forward to that.", "comment": "When the STL is standardized as a module so probably sometime after C++23", "upvote_ratio": 170.0, "sub": "cpp_questions"}593{"thread_id": "un21dy", "question": "I really look forward to that.", "comment": "Don't know but I really like them, I hope they become more popular soon.", "upvote_ratio": 30.0, "sub": "cpp_questions"}594{"thread_id": "un40af", "question": "How does fruit bats actually transmit diseases to us ? Because we won't know whether the fruits in our supermarkets are bitten by bats, but we still eat them carelessly. But whether there is a nipah outbreak people in some communities blame nearby bats and start killing bats. Can we really blame bats or is deforestation/ pig farms the cause?", "comment": "It\u2019s a little bit of all these things. Nipah is naturally found in fruit bats, they\u2019re the reservoir species. It could potentially spread to pigs if a pig were to eat fruit that an infected bat had bitten or had other body fluids on. From there it could spread to other pigs and people. Deforestation brings wildlife into closer contact with people and makes these spillover events more likely. The bats have likely been living with it for a long time, it\u2019s just that we\u2019re having more wildlife contact as we remove their habitat. If you\u2019re interested in this sort of thing, I highly recommend the book, Spillover. It\u2019s all about diseases that jump from species to species.", "upvote_ratio": 110.0, "sub": "AskScience"}595{"thread_id": "un4pau", "question": "Hey guys I am a big fan of multilingual learning and I am willing to become a translator in the U.S cuz I heard translator is not paid badly there.(btw I am computer science student) If everything goes well I will choose writer/cartoonist as my avocation also.", "comment": "You will do best in the medical field, but you will have to do a bit of schooling for it. You have to learn a lot of medical terms in both languages and take tests, but I'm sure it's a rewarding job. I loved working with the translators.", "upvote_ratio": 140.0, "sub": "AskAnAmerican"}596{"thread_id": "un4pau", "question": "Hey guys I am a big fan of multilingual learning and I am willing to become a translator in the U.S cuz I heard translator is not paid badly there.(btw I am computer science student) If everything goes well I will choose writer/cartoonist as my avocation also.", "comment": "Translation pay is directly tied to your qualifications. For example, translating legal contracts, patents, medical research, etc. pays one hell of a lot more than virtually everything else (entertainment, packaging, instruction manuals, and the like). \n\nTo get translation jobs in such fields, however, you generally need to be a good writer in the target language plus have specific knowledge in the domain in demand.\n\nIf you really want to go down this path the best option is to build experience in house at a large firm or government agency that has a need for a specific type of translation that you are qualified or willing to learn about, and then build up your profile and eventually go freelance.\n\nOne good source on all this is [Nataly Kelly of Hubspot](https://borntobeglobal.com/).", "upvote_ratio": 70.0, "sub": "AskAnAmerican"}597{"thread_id": "un4pau", "question": "Hey guys I am a big fan of multilingual learning and I am willing to become a translator in the U.S cuz I heard translator is not paid badly there.(btw I am computer science student) If everything goes well I will choose writer/cartoonist as my avocation also.", "comment": "I literally have no context for how the translation field works, how well translators get paid, or how much demand there is for English to Mandarin translation.", "upvote_ratio": 30.0, "sub": "AskAnAmerican"}598{"thread_id": "un4qt1", "question": "I\u2019m currently Uk based, and am open to the idea of moving abroad to expand my life and work horizons.\n\nI have been warned by my colleagues that the work/life balance is terrible for my counter parts in in America. \n\nAt the moment, I work 38 hour weeks, and I am not expected to work overtime. I have 30 paid vacation days off. Including an additional week for Christmas, and around 8 bonus bank holidays scattered thou out the year.\n\nHow does this compare to my counterparts on your side of the pond?", "comment": "\"STEM\" is such a wide range of careers it's impossible to answer on that basis. My wife and I both work in STEM fields and our jobs are extremely different.\n\nThe only thing I notice is that you have a few more vacation days. I have 15 days PTO, 5 sick days, plus our 11 federal holidays off. My wife has been with her company longer so she gets 5 extra.\n\nBut I work 100% from home, 40 hours a week.  In reality I spend about half that time actually working. Can't get more balanced than that.", "upvote_ratio": 150.0, "sub": "AskAnAmerican"}599{"thread_id": "un4qt1", "question": "I\u2019m currently Uk based, and am open to the idea of moving abroad to expand my life and work horizons.\n\nI have been warned by my colleagues that the work/life balance is terrible for my counter parts in in America. \n\nAt the moment, I work 38 hour weeks, and I am not expected to work overtime. I have 30 paid vacation days off. Including an additional week for Christmas, and around 8 bonus bank holidays scattered thou out the year.\n\nHow does this compare to my counterparts on your side of the pond?", "comment": "In general the work life balance is better in the UK but our pay is higher. \n\nIt's largely going to be dependent on your job and where you work though.", "upvote_ratio": 100.0, "sub": "AskAnAmerican"}600{"thread_id": "un4qt1", "question": "I\u2019m currently Uk based, and am open to the idea of moving abroad to expand my life and work horizons.\n\nI have been warned by my colleagues that the work/life balance is terrible for my counter parts in in America. \n\nAt the moment, I work 38 hour weeks, and I am not expected to work overtime. I have 30 paid vacation days off. Including an additional week for Christmas, and around 8 bonus bank holidays scattered thou out the year.\n\nHow does this compare to my counterparts on your side of the pond?", "comment": "You're not going to notice any major differences. Did your colleagues see that in a movie? I don't know where people get this stuff. As long as you're not working somewhere for the glamour of it and you have the ability to separate yourself from your work, you'll be fine. You're probably not going to get 30 days + 1 week of vacation, but you'll probably also only be putting in 30 hours of real work a week in an office job, if that.", "upvote_ratio": 90.0, "sub": "AskAnAmerican"}601{"thread_id": "un52qh", "question": "As an expatriate, I\u2019m endlessly amused at how possums can freak out people who\u2019ve never seen one before.", "comment": "The Bison\n\nMajestic and beautiful beasts.", "upvote_ratio": 200.0, "sub": "AskAnAmerican"}602{"thread_id": "un52qh", "question": "As an expatriate, I\u2019m endlessly amused at how possums can freak out people who\u2019ve never seen one before.", "comment": "'Possums are cool enough, for sure!\n\nBut my little vote goes to Bobcats. They're kind of a mini-me version of a panther. All the same characteristics, just a lot smaller. \n\nThey can be just as dangerous as a panther though, so if you spot one you need to stay clear. Bobcats are crazy territorial and will most definitely ruin your day if you step on their turf.", "upvote_ratio": 140.0, "sub": "AskAnAmerican"}603{"thread_id": "un52qh", "question": "As an expatriate, I\u2019m endlessly amused at how possums can freak out people who\u2019ve never seen one before.", "comment": "[mountain goats](https://en.wikipedia.org/wiki/Mountain_goat) - To me, they don\u2019t really look like goats that can be found elsewhere, but maybe I\u2019ve not seen enough of the world\u2019s goats. Either way, they\u2019re pretty nimble for being so brawny.\n\nEdit: Reading a bit of the article, they\u2019re not goats despite the name. So, that explains it then.", "upvote_ratio": 100.0, "sub": "AskAnAmerican"}604{"thread_id": "un552t", "question": "The resonance of the American accent is quite the most difficult part for me to understand.\nIt's there with every word but still hard to imitate.\nAngggg kind of sound. \nCan you suggest how a non native speaker learn this resonance? \nOr is it just Vocal Fry?", "comment": "Is there any certain part of America you're referring to? Accents vary greatly depending on where you are.", "upvote_ratio": 730.0, "sub": "AskAnAmerican"}605{"thread_id": "un552t", "question": "The resonance of the American accent is quite the most difficult part for me to understand.\nIt's there with every word but still hard to imitate.\nAngggg kind of sound. \nCan you suggest how a non native speaker learn this resonance? \nOr is it just Vocal Fry?", "comment": "OP you may be talking about vocal fry?\n\nhttps://www.voices.com/blog/vocal-fry/\n\nIn which case it's not an accent, it's a... Fad? Not sure the exact definition, but it's definitely not used by everyone. Mainly young women.", "upvote_ratio": 440.0, "sub": "AskAnAmerican"}606{"thread_id": "un552t", "question": "The resonance of the American accent is quite the most difficult part for me to understand.\nIt's there with every word but still hard to imitate.\nAngggg kind of sound. \nCan you suggest how a non native speaker learn this resonance? \nOr is it just Vocal Fry?", "comment": "I don't notice a buzz in any of the American accents I have encountered.", "upvote_ratio": 390.0, "sub": "AskAnAmerican"}607{"thread_id": "un5yll", "question": "By **technological standard** I mean OSI (TCP\\\\IP) protocol, SQL commands, XML, JSON, coding standards KISS, DRY, YAGNI, design patters\n\nBy **IT trends** I mean UML, microservices, project manifestations AGILE, SCRUM, REST and SOAP protocols, NoCode, latest programming languages (Go, Rust, Typescript, Kotlin)\n\nOne time you think Java and Objective C are standard for mobile development and now Kotlin and Swift took their niche\n\nI can be wrong categorizing concepts above because of little experience in programming so I would like ask your view of technologies", "comment": "There are two kinds of standard: de jure and de facto.\n\nDe jure, \"by right\", standards are written down and backed by a recognised body, often a standards body but not necessarily. For example ISO/IEC 27001 and ANSI Common Lisp and ANSI C.\n\nDe facto, \"in fact, whether by right or not\", standards are not backed by a recognised body as a standard, and are probably not written down. They're just what everyone does. SABSA is the de facto (it's the only) security architecture method for example. Objective-C, and now Swift, are a kind of de facto standard for Apple devices, because that's what Apple has decided it will be. (Not sure Java was ever a mobile device standard).\n\nAn industry trend is just the latest fashion, there are no standards for a trend, e.g. cloud or zero trust, although there might eventually be for specific ways of delivering on the trend. Object oriented analysis/design/programming is (hopefully was) an industry trend, UML was a standard (it is a de jure standard) originally created by a modelling tool maker, Rational, who wanted to make sure the OO world didn't fragment and so they could sell more copies of Rose. UML was later adopted by the OMG (Object Management Group, a standards group, not Oh My God!).\n\nI wouldn't call KISS or DRY or YAGNI standards or industry trends: they're more heuristics or principles. A crutch, monkey-see-monkey-do, rules for the less capable, if I am being rude. Because in 90% of cases they're right but in 10% they aren't.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}608{"thread_id": "un61oz", "question": "Do Americans strictly trace their ages using their birthdays? Is it unusual to consider yourself one year older when the new year comes? Even though your birthday hasn't come yet?", "comment": "Yes we count our age by our last birthday.\n\nBetween times or close to our next birthday, we might say \"almost\" the next age.", "upvote_ratio": 670.0, "sub": "AskAnAmerican"}609{"thread_id": "un61oz", "question": "Do Americans strictly trace their ages using their birthdays? Is it unusual to consider yourself one year older when the new year comes? Even though your birthday hasn't come yet?", "comment": "I count my age by how many trips I take around the Sun, not how many trips the Earth takes around the Sun .  \n\nStrictly my birthday.   Same for anyone I know.", "upvote_ratio": 280.0, "sub": "AskAnAmerican"}610{"thread_id": "un61oz", "question": "Do Americans strictly trace their ages using their birthdays? Is it unusual to consider yourself one year older when the new year comes? Even though your birthday hasn't come yet?", "comment": "Wait...is there somewhere that uses New Years?", "upvote_ratio": 160.0, "sub": "AskAnAmerican"}611{"thread_id": "un626k", "question": "What do you think about that it is mandatory to vote in Australia? would it change America?", "comment": "Australian here and honestly I'd prefer the American system.\n\nEveryone should be allowed to vote, but not required by law to.", "upvote_ratio": 980.0, "sub": "AskAnAmerican"}612{"thread_id": "un626k", "question": "What do you think about that it is mandatory to vote in Australia? would it change America?", "comment": "We\u2019d certainly have a lot more uninformed voters. They\u2019d probably all vote for [insert party here].", "upvote_ratio": 740.0, "sub": "AskAnAmerican"}613{"thread_id": "un626k", "question": "What do you think about that it is mandatory to vote in Australia? would it change America?", "comment": "I'd like to see how many votes there are for fictional, dead, or otherwise unknown characters in countries that force you to vote. There are people that do that here when you don't have to vote.", "upvote_ratio": 600.0, "sub": "AskAnAmerican"}614{"thread_id": "un66b6", "question": "Which state(s) would you say generally range between 65-75F the most often, with an ideal amount of humidity? Ive lived in Arizona where the heat is far too intense, and in illinois where the humidity is enough to kill you. Looking to move somewhere with much better weather.\n\nEdit: For those claiming illinois humidity is nothing, its currently at 90% and regularly is this high during summer.", "comment": "No state does that. San Diego is close, but is generally a bit warmer than that.", "upvote_ratio": 8640.0, "sub": "AskAnAmerican"}615{"thread_id": "un66b6", "question": "Which state(s) would you say generally range between 65-75F the most often, with an ideal amount of humidity? Ive lived in Arizona where the heat is far too intense, and in illinois where the humidity is enough to kill you. Looking to move somewhere with much better weather.\n\nEdit: For those claiming illinois humidity is nothing, its currently at 90% and regularly is this high during summer.", "comment": "Southern coastal California has some of the most consistent and ideal weather conditions for human life in the world. It's actually so consistent it kinda gets boring. It does get chilly at night during the winter but on average you'll find the weather somewhere between 60-80f but usually in the 70s.", "upvote_ratio": 5660.0, "sub": "AskAnAmerican"}616{"thread_id": "un66b6", "question": "Which state(s) would you say generally range between 65-75F the most often, with an ideal amount of humidity? Ive lived in Arizona where the heat is far too intense, and in illinois where the humidity is enough to kill you. Looking to move somewhere with much better weather.\n\nEdit: For those claiming illinois humidity is nothing, its currently at 90% and regularly is this high during summer.", "comment": "I'm gonna preface that there's only a few places like that in the US and they're all eye-wateringly expensive (like, the *cheapest* home is $1M+).\n\nThe only places that come to mind are San Diego and Berkeley/Emeryville/Oakland.\n\nThere's places that have a little bit colder winters (50F/10C) like Santa Barbara and Santa Cruz. And any place along the Bay Area peninsula from Burlingame to Sunnyvale.", "upvote_ratio": 2040.0, "sub": "AskAnAmerican"}617{"thread_id": "un73pn", "question": "I was always interested in that, since small towns in America usually has very limited transport options , unlike suburbs of big cities. Especially those who are younger than 16 and don't have driver's license. Are there school buses for that cases, or the school buses are used generally only for elementary school? In Europe, they usually use train or bus 'cause there is high population density and many local lines.", "comment": "There are school buses almost everywhere, including for high school students.  We don\u2019t expect children, including teenagers, to use public transportation to get to school.", "upvote_ratio": 740.0, "sub": "AskAnAmerican"}618{"thread_id": "un73pn", "question": "I was always interested in that, since small towns in America usually has very limited transport options , unlike suburbs of big cities. Especially those who are younger than 16 and don't have driver's license. Are there school buses for that cases, or the school buses are used generally only for elementary school? In Europe, they usually use train or bus 'cause there is high population density and many local lines.", "comment": "To school, you take a school bus for all grades.\n\nTo larger towns, you get a ride with a parents or friend or you bike or walk. I know people who biked 10 to 15 miles to work as teens in rural New England. If you can't get a ride, you don't go.\n\nEdit: added units.", "upvote_ratio": 310.0, "sub": "AskAnAmerican"}619{"thread_id": "un73pn", "question": "I was always interested in that, since small towns in America usually has very limited transport options , unlike suburbs of big cities. Especially those who are younger than 16 and don't have driver's license. Are there school buses for that cases, or the school buses are used generally only for elementary school? In Europe, they usually use train or bus 'cause there is high population density and many local lines.", "comment": "Public schools they have to bus you.  The ride to school may be 45 min to an hour.  They don't pick you up from your house, but rather a set location where other kids will gather.  \n\nIf private school, you can pay for a busing service, depending, or you drive your kids yourself. \n\nUsually kids in the city are okay on public transportation, but depending on the location.  At our school in inner Milwaukee, the school bus service was the safer option for the kids.", "upvote_ratio": 200.0, "sub": "AskAnAmerican"}620{"thread_id": "un75f0", "question": "Hi, I've been recently given this task where there's a file given named \"test.txt\" and within the file there's a line, now I've to sort them alphabetically. I'm aware of how to sort them but can't figure out how do I read the words as separate strings so that I can perform sort on them.\n\nDone this as of now, thanks!!\n\n    #include <iostream>\n    #include <string>\n    #include <fstream>\n    \n    int main()\n    {\n        fstream myFile(\"test.txt\",ios::in);\n        string str;\n        getline(myFile,str);\n    \n        string s;\n        \n        return 0;\n    }\n\nThe given text in the file is \"The main thing that propelled the development of the aeroplanes at such a fast pace was, however, the first and the second world war.\"", "comment": "You can use the `>>` to read a single word, i.e. all characters up to a whitespace:\n\n    string word;\n    fstream >> word;\n\nAlternatively you can read the entire line as you do now and implement you own function that splits the line into words. Basically you do this by iterating over every character in the line and if it isn't a whitespace you add that character to the current word, if it is a whitespace you put the current word in a list, and start a new current word.\n\nThen you just need to iterate over all the words in the line, see https://www.learncpp.com/cpp-tutorial/input-and-output-io-streams/\n\nThen you need to put each word into a list, I suggest you to use `std::vector`, see https://www.learncpp.com/cpp-tutorial/an-introduction-to-stdvector/, unless you are not allowed to by your teacher. There are already functions in the C++ standard library to sort the elements in a vector, see https://en.cppreference.com/w/cpp/algorithm/sort", "upvote_ratio": 30.0, "sub": "cpp_questions"}621{"thread_id": "un7vhd", "question": "Im curious, I've seen it in movies bunch of times in suburban area the guy is pulling his wheelie bin on sidewalk and leaves is there.\n\nHow does that work? You get the bin from local waste collection company or you have to buy your own? Then what, you just leave it on sidewalk at certain time and get it back to your yard after collection?", "comment": "Garbage truck comes a certain day of the week, that morning you leave it by the curb and the truck empties the bin into the back of the truck and leaves the bin where it was. You can then put it back where it goes wherever.\n\nWho gets the garbage bin is entirely dependent on city, I have had it supplied to me and had to source it myself.\n\nNote to Brits, garbage bin is a larger device that is used to hold multiple trash bags for a while, not a garbage can which is used to store a singular trash bag and is usually inside the house.", "upvote_ratio": 1030.0, "sub": "AskAnAmerican"}622{"thread_id": "un7vhd", "question": "Im curious, I've seen it in movies bunch of times in suburban area the guy is pulling his wheelie bin on sidewalk and leaves is there.\n\nHow does that work? You get the bin from local waste collection company or you have to buy your own? Then what, you just leave it on sidewalk at certain time and get it back to your yard after collection?", "comment": "It depends where you live. Generally you wheel the bin down on a designated day and pick it back up after the garbage man empties it.", "upvote_ratio": 430.0, "sub": "AskAnAmerican"}623{"thread_id": "un7vhd", "question": "Im curious, I've seen it in movies bunch of times in suburban area the guy is pulling his wheelie bin on sidewalk and leaves is there.\n\nHow does that work? You get the bin from local waste collection company or you have to buy your own? Then what, you just leave it on sidewalk at certain time and get it back to your yard after collection?", "comment": "I don\u2019t see it mentioned here, but some places do not have any government subsidized trash collection at all.  I have some friends who have to load their stuff in their vehicle and drive it to the dump.  They live out in the country, however.  Suburban or urban areas will have some kind of collection service.  I think.  Probably be a literal shitshow if they didn\u2019t.", "upvote_ratio": 240.0, "sub": "AskAnAmerican"}624{"thread_id": "un8cgg", "question": "I recently saw an article claiming that right and left wing people have the areas of the brain responsible for fear and empathy developed differently and that this was the cause of their political differences. Does this hypothesis has any merit among neuroscientists?", "comment": "I say *no* (I am a neuroscientist)\n\nWhat usually happens is, you collect a bunch of MRI data. This takes the form of a huge block of data, a datapoint for every cubic millimeter or so of brain tissue, every second or so (called a \"voxel\"). You collect an hours worth of this data for dozens of individuals - now you have *billions* of voxels.\n\nDo your preprocessing and your stats right, and you can find statistically significant differences between *any* two groupings of people you choose. Now you look through where those differences show up, and if you find you are able to construct a fun story out of the differences you observe and the way you sliced your subject sample, you write a paper! Voil\u00e0!\n\nThis is a bit cynical, sure: these supposed differences are a result of \"p-hacking\" with monstrous datasets. That's probably not all there is to it, but go look at some of these papers that correlate e.g. functional activity between some brain areas with certain personality attributes - you find that the 'differences' are between strongly overlapping groups. They are merely \"statistically significant\" which is a seriously fraught concept. \n\nLook at Figures 1 and 2 [here] (https://www.nature.com/articles/s41562-017-0248-5) or figure 3 in [this] (https://academic.oup.com/scan/article/13/1/43/4596542) to see what I'm talking about. These are the sorts of studies that are the basis for the ideas you are bringing up. If there are differences in the amygdala that account for political differences, they are faint and certainly not the fundamental component in the story.\n\n\"Causation\" is another fraught element here. If conservatives are *slightly* more likely to have a large amygdala (for example), that doesn't mean it's the *cause* of their politics. It might just as well be that having those opinions, over time, resulted in some differential growth of the amygdala. i.e. it might be an *effect* (albeit a very weak one) rather than a cause.\n\nOn the other hand, since the human mind *just is* the brain, it must be true that when there are differences between minds, there are differences between brains. But in my personal and professional opinion, these kinds of differences cannot be measured by any existing neuroimaging methods - they are a matter of fine-grained connectivity between relatively small numbers of neurons.", "upvote_ratio": 10010.0, "sub": "AskScience"}625{"thread_id": "un8cgg", "question": "I recently saw an article claiming that right and left wing people have the areas of the brain responsible for fear and empathy developed differently and that this was the cause of their political differences. Does this hypothesis has any merit among neuroscientists?", "comment": "We talked about it in grad school(political science), I am going to try to find [source](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3092984/) \n\nThe gist of it though is there is a difference in the brain as you said, and it is statistically relevant, but the effect is just not that strong. There is also still no good evidence of which way the causal arrow points, as in we don\u2019t know if the different brain structure leads to certain political ideologies, or if different ideologies shape parts of our brains differently.", "upvote_ratio": 1000.0, "sub": "AskScience"}626{"thread_id": "un8cgg", "question": "I recently saw an article claiming that right and left wing people have the areas of the brain responsible for fear and empathy developed differently and that this was the cause of their political differences. Does this hypothesis has any merit among neuroscientists?", "comment": "As tempting as it is to judge one's ideological opposites, and how satisfying it might be to have some scientific data that could be massaged to support that judgement, I think causation and correlation's on-again-off-again, tempestuous relationship is important to think about here. I don't personally think structural *brain differences* at adulthood **cause** anything, necessarily, any more than they might **result** from, say, environmental, genetic, and social factors over a person's lifetime.\n\nSo, I don't think saying different brains result in different politics is a valid scientific hypothesis, because there's no possible way to separate nature from nurture, here. People's beliefs are demonstrably affected by who and what they're exposed to over their lives, and brain structures demonstrably change in response to different external pressures and thinking patterns over time...so, really, I think your question is kind of backwards.", "upvote_ratio": 300.0, "sub": "AskScience"}627{"thread_id": "un975o", "question": "Trump vs Biden again? And if yes, who do you think will win and WHY?", "comment": "My head hurts.", "upvote_ratio": 6110.0, "sub": "AskAnAmerican"}628{"thread_id": "un975o", "question": "Trump vs Biden again? And if yes, who do you think will win and WHY?", "comment": "God fucking kill me.", "upvote_ratio": 3520.0, "sub": "AskAnAmerican"}629{"thread_id": "un975o", "question": "Trump vs Biden again? And if yes, who do you think will win and WHY?", "comment": "I think they are both going to be done and buried tbh\u2026 hope someone way younger gets the spot. Tired of seeing these old geezers in office.", "upvote_ratio": 1860.0, "sub": "AskAnAmerican"}630{"thread_id": "un9aln", "question": "[Previous weeks!](https://www.reddit.com/r/AskHistorians/search?sort=new&restrict_sr=on&q=flair%3ASASQ)\n\n**Please Be Aware**: We expect everyone to read the rules and guidelines of this thread. Mods *will* remove questions which we deem to be too involved for the theme in place here. We *will* remove answers which don't include a source. These removals will be without notice. Please follow the rules.\n\nSome questions people have just don't require depth. This thread is a recurring feature intended to provide a space for those simple, straight forward questions that are otherwise unsuited for the format of the subreddit.\n\nHere are the ground rules:\n\n* Top Level Posts should be questions in their own right.\n* Questions should be clear and specific in the information that they are asking for.\n* Questions which ask about broader concepts may be removed at the discretion of the Mod Team and redirected to post as a standalone question.\n* We realize that in some cases, users may pose questions that they don't realize are more complicated than they think. In these cases, we will suggest reposting as a stand-alone question.\n* Answers **MUST** be *properly* sourced to respectable literature. Unlike regular questions in the sub where sources are only required upon request, the lack of a source *will* result in removal of the answer.\n* Academic secondary sources are prefered. Tertiary sources are acceptable *if* they are of academic rigor (such as a book from the 'Oxford Companion' series, or a reference work from an academic press).\n* The *only* rule being relaxed here is with regard to depth, insofar as the anticipated questions are ones which do not require it. All other rules of the subreddit are in force.", "comment": "There's a trope of a medieval knight and his trusty squire traveling through the countryside on quests.\n\nI know quests didn't really happen but how many squires or servants would accompany an average, mid level knight on his journeys?\n\nLike for example, a knight has his knight's fee in Swabia and he's traveling to Italy to see the Emperor during the Hohenstaufen dynasty. He's not on campaign but there may or may not be some fighting. Would the knight still spend a large chunk of his earnings to arm himself and 10 others just in case Or would he travel himself prepared for battle but only with a squire or two so they could set the camps and tend the horses?\n\nWhat and how many would accompany a traveling knight?", "upvote_ratio": 100.0, "sub": "AskHistorians"}631{"thread_id": "un9aln", "question": "[Previous weeks!](https://www.reddit.com/r/AskHistorians/search?sort=new&restrict_sr=on&q=flair%3ASASQ)\n\n**Please Be Aware**: We expect everyone to read the rules and guidelines of this thread. Mods *will* remove questions which we deem to be too involved for the theme in place here. We *will* remove answers which don't include a source. These removals will be without notice. Please follow the rules.\n\nSome questions people have just don't require depth. This thread is a recurring feature intended to provide a space for those simple, straight forward questions that are otherwise unsuited for the format of the subreddit.\n\nHere are the ground rules:\n\n* Top Level Posts should be questions in their own right.\n* Questions should be clear and specific in the information that they are asking for.\n* Questions which ask about broader concepts may be removed at the discretion of the Mod Team and redirected to post as a standalone question.\n* We realize that in some cases, users may pose questions that they don't realize are more complicated than they think. In these cases, we will suggest reposting as a stand-alone question.\n* Answers **MUST** be *properly* sourced to respectable literature. Unlike regular questions in the sub where sources are only required upon request, the lack of a source *will* result in removal of the answer.\n* Academic secondary sources are prefered. Tertiary sources are acceptable *if* they are of academic rigor (such as a book from the 'Oxford Companion' series, or a reference work from an academic press).\n* The *only* rule being relaxed here is with regard to depth, insofar as the anticipated questions are ones which do not require it. All other rules of the subreddit are in force.", "comment": "Would the annexation of serbia, even though that was unlikely an initial goal of Austro-Hungarian empire, have gone to Austrian empire or Hungarian kingdom? I'm sure the Austrians would have wanted to keep it, but it mostly bordered Hungary and sounds like a disrupting event had it succeeded .", "upvote_ratio": 50.0, "sub": "AskHistorians"}632{"thread_id": "un9aln", "question": "[Previous weeks!](https://www.reddit.com/r/AskHistorians/search?sort=new&restrict_sr=on&q=flair%3ASASQ)\n\n**Please Be Aware**: We expect everyone to read the rules and guidelines of this thread. Mods *will* remove questions which we deem to be too involved for the theme in place here. We *will* remove answers which don't include a source. These removals will be without notice. Please follow the rules.\n\nSome questions people have just don't require depth. This thread is a recurring feature intended to provide a space for those simple, straight forward questions that are otherwise unsuited for the format of the subreddit.\n\nHere are the ground rules:\n\n* Top Level Posts should be questions in their own right.\n* Questions should be clear and specific in the information that they are asking for.\n* Questions which ask about broader concepts may be removed at the discretion of the Mod Team and redirected to post as a standalone question.\n* We realize that in some cases, users may pose questions that they don't realize are more complicated than they think. In these cases, we will suggest reposting as a stand-alone question.\n* Answers **MUST** be *properly* sourced to respectable literature. Unlike regular questions in the sub where sources are only required upon request, the lack of a source *will* result in removal of the answer.\n* Academic secondary sources are prefered. Tertiary sources are acceptable *if* they are of academic rigor (such as a book from the 'Oxford Companion' series, or a reference work from an academic press).\n* The *only* rule being relaxed here is with regard to depth, insofar as the anticipated questions are ones which do not require it. All other rules of the subreddit are in force.", "comment": "(Book suggestion on Christianity)\n\nI would like to read a book on the history of the early Christian church (up through and including the East-West Schism).  The two books I'm looking at are MacCulloch's *Christianity: The First Three Thousand Years* and Robert Louis Wilken's *The First Thousand Years: A Global History of Christianity*.  MacCulloch's appears to be more popular, but Wilken's is published by Yale and is shorter.  Can someone recommend either of these, or perhaps something else?  Thanks!", "upvote_ratio": 30.0, "sub": "AskHistorians"}633{"thread_id": "un9u8w", "question": "So I was looking for job offers, and I came across an HTML email developer, it pays a bit more than what I am doing right now (technical designer), but I never heard of this kind of jobs, in my mind, it sounds like quite simple. I googled and I found that it was mostly doing HTML and debugging through different browsers/email clients.\nSo my question is, is there some hidden things that I am missing? What does the job actually entails? Is there potentially an HTML email developer that can enlighten me?\nPS: and an extra question, what portfolio would be considered good for this kind of job?", "comment": "The HTML in HTML emails is a tightly restricted subset of HTML since it can only be what's safe enough to embed in a webmail client. So I imagine it would be pretty annoying since so much of what you Google wouldn't be usable and most of the techniques you end up using would be considered bad practices on normal web pages, specifically using tables for layout.", "upvote_ratio": 280.0, "sub": "AskProgramming"}634{"thread_id": "un9u8w", "question": "So I was looking for job offers, and I came across an HTML email developer, it pays a bit more than what I am doing right now (technical designer), but I never heard of this kind of jobs, in my mind, it sounds like quite simple. I googled and I found that it was mostly doing HTML and debugging through different browsers/email clients.\nSo my question is, is there some hidden things that I am missing? What does the job actually entails? Is there potentially an HTML email developer that can enlighten me?\nPS: and an extra question, what portfolio would be considered good for this kind of job?", "comment": "It's basically doing 90s style HTML (and very limited inline CSS)... because most email clients only support very old + basic HTML/CSS.  \n\nIt's fairly straight forward work, because not much changes... you just need to do lots of compatibility testing.\n\nBut it can be frustrating, because you won't be getting to play with any new tech, and the work will be quite repetitive.  Also not the best thing to have on your resume in the future if you want to move on to more modern webdev etc.  It won't really make you look like much of a \"programmer\".\n\nBut it might be suited to people who don't really like programming that much, and just want a fairly straight forward tech job where you don't need to learn a lot or keep up to date with new tech.  i.e. Very little creativity, it's kinda like being a factory line worker of the dev world.", "upvote_ratio": 90.0, "sub": "AskProgramming"}635{"thread_id": "un9u8w", "question": "So I was looking for job offers, and I came across an HTML email developer, it pays a bit more than what I am doing right now (technical designer), but I never heard of this kind of jobs, in my mind, it sounds like quite simple. I googled and I found that it was mostly doing HTML and debugging through different browsers/email clients.\nSo my question is, is there some hidden things that I am missing? What does the job actually entails? Is there potentially an HTML email developer that can enlighten me?\nPS: and an extra question, what portfolio would be considered good for this kind of job?", "comment": "I imagine a large part of the job will be finding ways to bypass the spam filters on gmail and outlook", "upvote_ratio": 70.0, "sub": "AskProgramming"}636{"thread_id": "un9vmo", "question": "The Stonewall Riots were a watershed moment in American queer history, but personally I didn't hear about them until some point in college - they weren't even mentioned in any history or social studies classes. I'm curious whether they're at all widely known outside of the New York area.", "comment": "They were briefly covered in AP US history in my high school in the late 90s.\n\nMy teacher was a very liberal activist type teacher. I don\u2019t know if it was part of the normal AP US History curriculum.\n\nMost of what I know about them was from just reading about history after high school.", "upvote_ratio": 250.0, "sub": "AskAnAmerican"}637{"thread_id": "un9vmo", "question": "The Stonewall Riots were a watershed moment in American queer history, but personally I didn't hear about them until some point in college - they weren't even mentioned in any history or social studies classes. I'm curious whether they're at all widely known outside of the New York area.", "comment": "When I went to school (80s-90s), History covered very little after WW2, except for brief discussions of Korea, Vietnam, and the Cold War.  Anything recent of a more cultural nature we were expected to just pick up ourselves, I think; to be fair, that mostly worked.  Now that we\u2019re talking about something over 50 years ago instead of 20, I would bet it\u2019s in more books.", "upvote_ratio": 180.0, "sub": "AskAnAmerican"}638{"thread_id": "un9vmo", "question": "The Stonewall Riots were a watershed moment in American queer history, but personally I didn't hear about them until some point in college - they weren't even mentioned in any history or social studies classes. I'm curious whether they're at all widely known outside of the New York area.", "comment": "They're mentioned, but typically as an example of the general societal unrest during the 60s rather than directly focused upon.", "upvote_ratio": 60.0, "sub": "AskAnAmerican"}639{"thread_id": "unaazq", "question": "So, several times in my career over the years, I have contemplated a switch to an IT career. My focus would be networks and/or security. My father in an IT lifer and have several good friends in the IT field. I myself am an industry biologist. While I absolutely love science and am passionate about my work, some toxic work environments I have found myself in have pushed me to go in a different direction.  IT has always one of those things I think I could be really happy doing. I have always had a knack for understanding computers and how to troubleshoot them, I have never ventured beyond the hobbyist sort of computer nerd. I have always wanted to step up my credentials in my desired path and become a professional.\n\nEach time I try, my IT buddies are always a bit pessimistic. Before now, say about 10 years ago, the reaction was \"You will not make a lot of money starting out in IT\" and various other arguments about starting IT from the bottom. BTW, the money in biology isn't great either. But if your a science nerd like me, biological lab and field work can be rewarding. \n\nSo now, at 40, and again in a toxic environment and industry job, I am looking to make an exit and find another passion to pursue professionally. Now, my friends say that I have no chance to beat out a recent college grad with no experience for a job. The idea is that put a recent college grad with little to no xp vs a motivated 40 year old with little to no xp, HR will always go with the college grad, hands down. So it seems they are telling me that I missed the boat and stick to biology.\n\nWhat do you guys think? Would it be a waste of time to seek out some certifications and head for the nearest help desk wanted ad?\n\nEdit: Some great advice and feeling the reddit love. But want to clear up one topic. I know the money won't be anywhere near what I make now. I have an established career and some serious credentials backing up my experience currently. I am not looking for a change to make the money. I want the change to reinvigorate me. I want a job that I can learn and growth with in something new and exciting (for me). I also know that toxic work environments are everywhere. I just am just stuck in one right now and that is what is spurring the change.", "comment": "I'm 38, went back to school at 35 and got my associates degree in CIS/MIS. Graduated a year ago. I'm finishing up my second contracted project this month and starting my first direct hire IT role next month in desktop support. Ill be enrolling in the fall to pursue my bachelor's as well. I also have a wife and 3 kids, one of them being just 3 weeks old. \n\nThe point of that is...fuck your friends. \n\nGo for it. \n\nIf I can do it then so can you.", "upvote_ratio": 4390.0, "sub": "ITCareerQuestions"}640{"thread_id": "unaazq", "question": "So, several times in my career over the years, I have contemplated a switch to an IT career. My focus would be networks and/or security. My father in an IT lifer and have several good friends in the IT field. I myself am an industry biologist. While I absolutely love science and am passionate about my work, some toxic work environments I have found myself in have pushed me to go in a different direction.  IT has always one of those things I think I could be really happy doing. I have always had a knack for understanding computers and how to troubleshoot them, I have never ventured beyond the hobbyist sort of computer nerd. I have always wanted to step up my credentials in my desired path and become a professional.\n\nEach time I try, my IT buddies are always a bit pessimistic. Before now, say about 10 years ago, the reaction was \"You will not make a lot of money starting out in IT\" and various other arguments about starting IT from the bottom. BTW, the money in biology isn't great either. But if your a science nerd like me, biological lab and field work can be rewarding. \n\nSo now, at 40, and again in a toxic environment and industry job, I am looking to make an exit and find another passion to pursue professionally. Now, my friends say that I have no chance to beat out a recent college grad with no experience for a job. The idea is that put a recent college grad with little to no xp vs a motivated 40 year old with little to no xp, HR will always go with the college grad, hands down. So it seems they are telling me that I missed the boat and stick to biology.\n\nWhat do you guys think? Would it be a waste of time to seek out some certifications and head for the nearest help desk wanted ad?\n\nEdit: Some great advice and feeling the reddit love. But want to clear up one topic. I know the money won't be anywhere near what I make now. I have an established career and some serious credentials backing up my experience currently. I am not looking for a change to make the money. I want the change to reinvigorate me. I want a job that I can learn and growth with in something new and exciting (for me). I also know that toxic work environments are everywhere. I just am just stuck in one right now and that is what is spurring the change.", "comment": "Why do you care what your friends think? If they're not ambitious, that's their problem. You can make plenty of money as a 40 year old just starting in IT. Go for it.", "upvote_ratio": 840.0, "sub": "ITCareerQuestions"}641{"thread_id": "unaazq", "question": "So, several times in my career over the years, I have contemplated a switch to an IT career. My focus would be networks and/or security. My father in an IT lifer and have several good friends in the IT field. I myself am an industry biologist. While I absolutely love science and am passionate about my work, some toxic work environments I have found myself in have pushed me to go in a different direction.  IT has always one of those things I think I could be really happy doing. I have always had a knack for understanding computers and how to troubleshoot them, I have never ventured beyond the hobbyist sort of computer nerd. I have always wanted to step up my credentials in my desired path and become a professional.\n\nEach time I try, my IT buddies are always a bit pessimistic. Before now, say about 10 years ago, the reaction was \"You will not make a lot of money starting out in IT\" and various other arguments about starting IT from the bottom. BTW, the money in biology isn't great either. But if your a science nerd like me, biological lab and field work can be rewarding. \n\nSo now, at 40, and again in a toxic environment and industry job, I am looking to make an exit and find another passion to pursue professionally. Now, my friends say that I have no chance to beat out a recent college grad with no experience for a job. The idea is that put a recent college grad with little to no xp vs a motivated 40 year old with little to no xp, HR will always go with the college grad, hands down. So it seems they are telling me that I missed the boat and stick to biology.\n\nWhat do you guys think? Would it be a waste of time to seek out some certifications and head for the nearest help desk wanted ad?\n\nEdit: Some great advice and feeling the reddit love. But want to clear up one topic. I know the money won't be anywhere near what I make now. I have an established career and some serious credentials backing up my experience currently. I am not looking for a change to make the money. I want the change to reinvigorate me. I want a job that I can learn and growth with in something new and exciting (for me). I also know that toxic work environments are everywhere. I just am just stuck in one right now and that is what is spurring the change.", "comment": "You have a STEM degree, you have a good story to tell, you (presumably) have a work ethic that will enable you to be successful.  Go for it.", "upvote_ratio": 700.0, "sub": "ITCareerQuestions"}642{"thread_id": "unacle", "question": "I am experimenting with A\\* pathfinding, and I have been using the Wikipedia pseudo code for reference. It works fine, but I have a question regarding optimization...\n\nTowards the end, I have to check if a node is in the open list:\n\n     if neighbor not in openSet \n\nAssuming the openSet is a min heap, what is the most efficient way of doing this? Right now I am just iterating through the container (which is a vector turned min heap) to see if I find the element, but this means I have to check every element if it's not there.\n\nIs there a better way to do it, or am I overthinking this and is this fine?", "comment": "Hashsets, bitsets.", "upvote_ratio": 50.0, "sub": "cpp_questions"}643{"thread_id": "unaikd", "question": "Welcome to our weekly feature, Ask Anything Wednesday - this week we are focusing on **Biology, Chemistry, Neuroscience, Medicine, Psychology**\n\nDo you have a question within these topics you weren't sure was worth submitting? Is something a bit too speculative for a typical /r/AskScience post? No question is too big or small for AAW. In this thread you can ask any science-related question! Things like: \"What would happen if...\", \"How will the future...\", \"If all the rules for 'X' were different...\", \"Why does my...\".\n\n**Asking Questions:**\n\nPlease post your question as a top-level response to this, and our team of panellists will be here to answer and discuss your questions. The other topic areas will appear in future Ask Anything Wednesdays, so if you have other questions not covered by this weeks theme please either hold on to it until those topics come around, or go and post over in our sister subreddit /r/AskScienceDiscussion , where every day is Ask Anything Wednesday! Off-theme questions in this post will be removed to try and keep the thread a manageable size for both our readers and panellists.\n\n**Answering Questions:**\n\nPlease only answer a posted question if you are an expert in the field. [The full guidelines for posting responses in AskScience can be found here](http://www.reddit.com/r/askscience/wiki/index#wiki_answering_askscience). In short, this is a moderated subreddit, and responses which do not meet our quality guidelines will be removed. Remember, peer reviewed sources are always appreciated, and anecdotes are absolutely not appropriate. In general if your answer begins with 'I think', or 'I've heard', then it's not suitable for /r/AskScience.\n\nIf you would like to become a member of the AskScience panel, [please refer to the information provided here](https://www.reddit.com/r/askscience/about/sticky).\n\nPast AskAnythingWednesday posts [can be found here](http://www.reddit.com/r/askscience/search?q=flair%3A%27meta%27&restrict_sr=on&sort=new&t=all). Ask away!", "comment": "[Neuroscience] \nIt\u2019s said that, when you go though some trauma (I\u2019m thinking about ptsd) your brain is physically damaged in the process. How can that happen? How does that actually happen? (So what is damaged and how)\n\nThanks!", "upvote_ratio": 240.0, "sub": "AskScience"}644{"thread_id": "unaikd", "question": "Welcome to our weekly feature, Ask Anything Wednesday - this week we are focusing on **Biology, Chemistry, Neuroscience, Medicine, Psychology**\n\nDo you have a question within these topics you weren't sure was worth submitting? Is something a bit too speculative for a typical /r/AskScience post? No question is too big or small for AAW. In this thread you can ask any science-related question! Things like: \"What would happen if...\", \"How will the future...\", \"If all the rules for 'X' were different...\", \"Why does my...\".\n\n**Asking Questions:**\n\nPlease post your question as a top-level response to this, and our team of panellists will be here to answer and discuss your questions. The other topic areas will appear in future Ask Anything Wednesdays, so if you have other questions not covered by this weeks theme please either hold on to it until those topics come around, or go and post over in our sister subreddit /r/AskScienceDiscussion , where every day is Ask Anything Wednesday! Off-theme questions in this post will be removed to try and keep the thread a manageable size for both our readers and panellists.\n\n**Answering Questions:**\n\nPlease only answer a posted question if you are an expert in the field. [The full guidelines for posting responses in AskScience can be found here](http://www.reddit.com/r/askscience/wiki/index#wiki_answering_askscience). In short, this is a moderated subreddit, and responses which do not meet our quality guidelines will be removed. Remember, peer reviewed sources are always appreciated, and anecdotes are absolutely not appropriate. In general if your answer begins with 'I think', or 'I've heard', then it's not suitable for /r/AskScience.\n\nIf you would like to become a member of the AskScience panel, [please refer to the information provided here](https://www.reddit.com/r/askscience/about/sticky).\n\nPast AskAnythingWednesday posts [can be found here](http://www.reddit.com/r/askscience/search?q=flair%3A%27meta%27&restrict_sr=on&sort=new&t=all). Ask away!", "comment": "If a physically and psychologically healthy person experiences no significant situations of fear, stress or excitement on any given day, will adrenaline still have a role to play in their bodily function on that day?\n\nIn other words, does adrenaline have a role to play outside of the fight-or-flight response?", "upvote_ratio": 170.0, "sub": "AskScience"}645{"thread_id": "unaikd", "question": "Welcome to our weekly feature, Ask Anything Wednesday - this week we are focusing on **Biology, Chemistry, Neuroscience, Medicine, Psychology**\n\nDo you have a question within these topics you weren't sure was worth submitting? Is something a bit too speculative for a typical /r/AskScience post? No question is too big or small for AAW. In this thread you can ask any science-related question! Things like: \"What would happen if...\", \"How will the future...\", \"If all the rules for 'X' were different...\", \"Why does my...\".\n\n**Asking Questions:**\n\nPlease post your question as a top-level response to this, and our team of panellists will be here to answer and discuss your questions. The other topic areas will appear in future Ask Anything Wednesdays, so if you have other questions not covered by this weeks theme please either hold on to it until those topics come around, or go and post over in our sister subreddit /r/AskScienceDiscussion , where every day is Ask Anything Wednesday! Off-theme questions in this post will be removed to try and keep the thread a manageable size for both our readers and panellists.\n\n**Answering Questions:**\n\nPlease only answer a posted question if you are an expert in the field. [The full guidelines for posting responses in AskScience can be found here](http://www.reddit.com/r/askscience/wiki/index#wiki_answering_askscience). In short, this is a moderated subreddit, and responses which do not meet our quality guidelines will be removed. Remember, peer reviewed sources are always appreciated, and anecdotes are absolutely not appropriate. In general if your answer begins with 'I think', or 'I've heard', then it's not suitable for /r/AskScience.\n\nIf you would like to become a member of the AskScience panel, [please refer to the information provided here](https://www.reddit.com/r/askscience/about/sticky).\n\nPast AskAnythingWednesday posts [can be found here](http://www.reddit.com/r/askscience/search?q=flair%3A%27meta%27&restrict_sr=on&sort=new&t=all). Ask away!", "comment": "I've always wondered if the electricity in our bodies has been observed to dissipate when we die or when we go to sleep.", "upvote_ratio": 130.0, "sub": "AskScience"}646{"thread_id": "unbdc6", "question": "What condiments do NOT go with barbecue?", "comment": "This is going to be a proxy war for people slamming different regional barbecue sauces", "upvote_ratio": 1690.0, "sub": "AskAnAmerican"}647{"thread_id": "unbdc6", "question": "What condiments do NOT go with barbecue?", "comment": "Ketchup.  You can use it as a base for making a barbecue sauce if you want (there are better ways) but don't ever give me ketchup itself.", "upvote_ratio": 1020.0, "sub": "AskAnAmerican"}648{"thread_id": "unbdc6", "question": "What condiments do NOT go with barbecue?", "comment": "Maple flavored corn syrup.", "upvote_ratio": 650.0, "sub": "AskAnAmerican"}649{"thread_id": "unc1ll", "question": "Yesterday I went to a cheesecake factory that opened in my country with a friend from the US, everything was delicious and very big, but it was quite pricey (I mean they serve a lot so it wasn't going to be cheap) but then I ordered a cheesecake slice with strawberry and it was very expensive for what I got IMO, and my friend said that it wasn't that expensive, that in usa the majority of restaurants cost around the same, that I just felt it expensive because food in Mexico is super cheap, is that true?", "comment": "They're on the expensive side of the average but they are far from \"very expensive\".", "upvote_ratio": 1670.0, "sub": "AskAnAmerican"}650{"thread_id": "unc1ll", "question": "Yesterday I went to a cheesecake factory that opened in my country with a friend from the US, everything was delicious and very big, but it was quite pricey (I mean they serve a lot so it wasn't going to be cheap) but then I ordered a cheesecake slice with strawberry and it was very expensive for what I got IMO, and my friend said that it wasn't that expensive, that in usa the majority of restaurants cost around the same, that I just felt it expensive because food in Mexico is super cheap, is that true?", "comment": "Cheesecake Factory is typically a full service restaurant mostly based out of malls. It is probably a higher price point for the more casual sit-down dining (think TGI Fridays, Applebees). The prices aren't budget prices, but you're getting a lot of food and they specifically promote that \"everyone leaves with a doggy bag\" or whatever.\n\nIt isn't an every day thing for most people though. It isn't even a every weekend-thing. Its where you go with your family on a night out, or when you want to splurge a little.\n\nBut it also isn't fine dining where you can easily spend $100-150 per person.\n\nAlso I imagine most Cheesecake Factories abroad are probably in tourist areas catering to American or western tourists. They may even be more expensive than they are back home.", "upvote_ratio": 1360.0, "sub": "AskAnAmerican"}651{"thread_id": "unc1ll", "question": "Yesterday I went to a cheesecake factory that opened in my country with a friend from the US, everything was delicious and very big, but it was quite pricey (I mean they serve a lot so it wasn't going to be cheap) but then I ordered a cheesecake slice with strawberry and it was very expensive for what I got IMO, and my friend said that it wasn't that expensive, that in usa the majority of restaurants cost around the same, that I just felt it expensive because food in Mexico is super cheap, is that true?", "comment": "I would put them above average, and not really worth it unless you just love cheesecake.", "upvote_ratio": 960.0, "sub": "AskAnAmerican"}652{"thread_id": "unc50n", "question": "So I have heard that infra-red radiation is heat.  In other words that IR is a certain frequency of electromagnetic radiation, like visible light and radio waves.  I also know that heat is something like the energy in a system, or that it\u2019s kind of a measure of how much molecules are vibrating.  \n\nSo are heat and IR one and the same?  Or is IR one type of heat?  I\u2019m a little confused about the exact definitions here.", "comment": "This question has a lot to unpack. \n\nFirst, IR is not the same thing as heat, as you surmised. Heat is energy, which is transferred in a thermodynamic system. IR is electromagnetic radiation- so while IR *has* energy, it's not right to say that is *is* energy/heat. \n\nSo, what are the connections between heat and IR? First, there is the fact that radiation is one of the methods to transfer heat. The \"big three\" ways of transferring heat is via conduction (two objects touch, heat flows between the two objects), convection (there is a fluid like air or water between two objects, and the heat is carried by the fluid from one object to another), and radiation (Electromagnetic radiation leaves one object and is absorbed by another). \n\nOn Earth, the primary way things are heated is via convection (there is something hot in your room, it heats the air, the air heats you). In Space, the primary way things are heated or cooled is radiation (radiation from the Sun hits the space shuttle, the space shuttle absorbs it, heating up). This is why things heat up and cool off much slower in space than perhaps people expect- radiative heating/cooling is much slower than convective heating/cooling. So, if you were ejected into deep space far from a star, even though it's \"very cold\" there, it would take some time for you to cool off, because the only way for you to lose heat is via radiative cooling. (Also of interest, there are [infrared heaters](https://home.howstuffworks.com/home-improvement/heating-and-cooling/infrared-heaters.htm) which are more efficient than regular heaters because it heats you instead of all of the air). \n\nSo, IR is a type of radiation, meaning it can carry heat. But this leads to the next question- if any electromagnetic radiation can carry heat, why IR, and not- say, visible light or X-Rays? The answer lies in [blackbody radiation](https://en.wikipedia.org/wiki/Black-body_radiation) which essentially says \"the hotter an object, the shorter the wavelength of light it emits\" (while there's a lot more to it than that, that's the important part for this). So the Sun is really hot, and emits visible light (this is also how incandescent light bulbs work- they just heat up really hot to emit visible light). But that is hotter than we normally want things- so IR radiation is radiated by things which are the temperature we normally want things to be. So something that's like 100 F (aka- about a human body), will emit IR radiation. \n\nThis is also how passive night vision goggles work- instead of looking in the visible spectrum, they see in the IR spectrum, tuned towards the temperatures we would expect things to be (aka, around body temperature). So, warm objects (like humans) emit IR radiation, via black body radiation, and these goggles see those, and then convert that into visible light in your goggles.", "upvote_ratio": 820.0, "sub": "AskScience"}653{"thread_id": "unc50n", "question": "So I have heard that infra-red radiation is heat.  In other words that IR is a certain frequency of electromagnetic radiation, like visible light and radio waves.  I also know that heat is something like the energy in a system, or that it\u2019s kind of a measure of how much molecules are vibrating.  \n\nSo are heat and IR one and the same?  Or is IR one type of heat?  I\u2019m a little confused about the exact definitions here.", "comment": "Since it has already been explained quite thoroughly by others, let me add this sidenote that might help:\n\nAny objects with a temperature radiate that thermal energy away slowly to its surroundings.   Take for example a book that is lying on your desk. It is constantly radiating away its energy to its surroundings. But because the rest of your room is probably almost the same temperature as the book, the room is also radiating its energy back to the book. In this dance, everything is constantly emitting, and absorbing energy. In a room where everything is the same temperature, this simply cancels eachother out. If you place something hot, like a cup of coffee, in the room however, it's radiating out more energy than it is receiving, thus it loses heat to radiation. \n\nThis electromagnetic radiation that an object emits, consists of a distribution of various wavelengths of light. At the temperatures we see in our everyday life, these wavelengths are almost all in the infrared regime. That is why you can see the temperature of objects with an infrared camera. [As objects heat up however, this distribution shifts towards the lower wavelengths - and into the visible light regime.](https://en.wikipedia.org/wiki/Black-body_radiation#/media/File:Black_body.svg) That is why you can see metal glow when it gets hot enough.", "upvote_ratio": 40.0, "sub": "AskScience"}654{"thread_id": "uncjr1", "question": " have you met any veterans?", "comment": "Gen Xer here. I went back to school last year to complete my degree and currently I'm taking US History, post 1865 (just after the Civil War). The book we are using is Give Me Liberty by Eric Foner. Let me just say, I cannot recommend this book enough. My comment doesn't answer your question, but if you want an accurate and well-written account of US history, including our involvement in WWI, this book is IT! I did terribly in high school, and paid zero attention in history class. Now I have a 100% grade and we are almost finished (finals this week). That's all, just a nerdy book recommendation. :)", "upvote_ratio": 180.0, "sub": "AskOldPeople"}655{"thread_id": "uncjr1", "question": " have you met any veterans?", "comment": "My great uncle was a veteran of WW1.  He didn\u2019t say much about it, but then he didn\u2019t talk much. He was a bit of a recluse. He did give me peppermints whenever I saw him though.", "upvote_ratio": 180.0, "sub": "AskOldPeople"}656{"thread_id": "uncjr1", "question": " have you met any veterans?", "comment": "My grandfather was a US Army veterinarian who treated horses. He was in France in WW1 but never spoke about what he did or saw there.", "upvote_ratio": 90.0, "sub": "AskOldPeople"}657{"thread_id": "uncvn4", "question": "For example I was born in the late 90s, and I can\u2019t imagine what technology would be like in 2050 and beyond, I imagine it\u2019d blow me away", "comment": "Some folks think everyone over 60 have problems w technology. But the truth is, most of us who still have our faculties, don\u2019t. \n\nWe totally grew up w it; ALL of it. The good, bad and ugly. However, it was an option whether you chose to use it, evolve w it, or live with it. \n\nI was born in 50\u2019s and technological change was a slow moving train until about 2010.", "upvote_ratio": 2090.0, "sub": "AskOldPeople"}658{"thread_id": "uncvn4", "question": "For example I was born in the late 90s, and I can\u2019t imagine what technology would be like in 2050 and beyond, I imagine it\u2019d blow me away", "comment": "Well it would be a shock if you had a time machine and could get there instantly. But change happens over time. We were there for the small, incremental changes that gave us the modern technology. Some things were shockingly \u2018fast\u2019 because we didn\u2019t see or hear of the research that lead to it. The first heart transplant for instance, or the first \u2018test tube baby\u2019 or the first cloned sheep. Those seemed shocking because we had no idea they were on the horizon", "upvote_ratio": 1480.0, "sub": "AskOldPeople"}659{"thread_id": "uncvn4", "question": "For example I was born in the late 90s, and I can\u2019t imagine what technology would be like in 2050 and beyond, I imagine it\u2019d blow me away", "comment": "71 here...\n\nIt just creeps in quietly. With each new thing, there's no watershed moment.\n\nI once asked my grandmother [b.1886] what she thought when she saw her first airplane.  She didn't remember it. \n\nThat's how that shit goes.", "upvote_ratio": 1200.0, "sub": "AskOldPeople"}660{"thread_id": "und2mk", "question": "In a field dominated by introverts, I haven't met many (if any) extrovert developers. To those that are extroverts, do you like being a programmer? Do you think you'd be happier in another career where you could check more of your extrovert boxes?", "comment": "I do. I don't think I agree with the premise that it's introvert-dominated tbh\n\nThe fact you haven't met any extroverts makes me think you've either been worked in very homogeneous companies, or you don't really understand introversion/extraversion", "upvote_ratio": 50.0, "sub": "AskProgramming"}661{"thread_id": "und2mk", "question": "In a field dominated by introverts, I haven't met many (if any) extrovert developers. To those that are extroverts, do you like being a programmer? Do you think you'd be happier in another career where you could check more of your extrovert boxes?", "comment": "> In a field dominated by introverts\n\nThat's more a stereotype than reality.", "upvote_ratio": 30.0, "sub": "AskProgramming"}662{"thread_id": "undd0a", "question": "When you give it day and leave work - what do you do?", "comment": "Lay in bed and rethink my life choices\n\nThen I get a snack", "upvote_ratio": 1410.0, "sub": "AskAnAmerican"}663{"thread_id": "undd0a", "question": "When you give it day and leave work - what do you do?", "comment": "I usually pick up shifts at my second job where I work as Lead Patriarch and Diaper Technician.", "upvote_ratio": 820.0, "sub": "AskAnAmerican"}664{"thread_id": "undd0a", "question": "When you give it day and leave work - what do you do?", "comment": "Go home to the wife and kids.  \nGo and coach my son's ice hockey team.   \nGo to one of my hockey games.", "upvote_ratio": 340.0, "sub": "AskAnAmerican"}665{"thread_id": "unds1k", "question": "At first I presumed it was because they were polymorphs, but that doesn't seem to be the case. It also doesn't seem to be a result of particle size (i.e. like maybe only nanoscale particles appear red). What's going on here?", "comment": "I think fully anhydrous iron(III) oxide is black, so when macrocrystalline (as in haematite) it appears silvery. Much like a metal - metal powders are black, but the crystalline material is silvery. It's almost certainly not the same physical phenomenon causing the shininess though.\n\nRust is red, orange, yellow etc. because it is hydrated to varying degrees, and this differing colour is due to differences in the crystal field splitting", "upvote_ratio": 90.0, "sub": "AskScience"}666{"thread_id": "unds1k", "question": "At first I presumed it was because they were polymorphs, but that doesn't seem to be the case. It also doesn't seem to be a result of particle size (i.e. like maybe only nanoscale particles appear red). What's going on here?", "comment": "Huh, I had always assumed it is different forms of rust, like hydrated iron oxide Fe2O3 being red, waterless iron oxide being brown, iron oxide-hydroxide being yellow and Iron II oxide being black.\n\nCurious to see if theres something more to it.", "upvote_ratio": 50.0, "sub": "AskScience"}667{"thread_id": "undwpj", "question": "I work at a thrift store and my job is to inspect everything that gets donated to make sure we are able to sell it. I've noticed that a lot of items have social security numbers carved into them. I see it a lot with old cameras, but I've also seen it on the bottoms of statues and even on a piano once. It's really confusing to me because my generation was raised to never give out our social security numbers because of identity theft, but I guess that was less of a concern pre-internet. However, I don't understand the point of writing it on a random object. Is it so the item can be returned to you in case it is stolen? Would love to learn more about the reasoning for this.", "comment": "When I was in college, it was my student ID number.    \nThe kind of identity theft we worry about now just didn\u2019t exist. Getting any sort of credit was a difficult process and needed a lot of face to face interactions to procure.", "upvote_ratio": 130.0, "sub": "AskOldPeople"}668{"thread_id": "undwpj", "question": "I work at a thrift store and my job is to inspect everything that gets donated to make sure we are able to sell it. I've noticed that a lot of items have social security numbers carved into them. I see it a lot with old cameras, but I've also seen it on the bottoms of statues and even on a piano once. It's really confusing to me because my generation was raised to never give out our social security numbers because of identity theft, but I guess that was less of a concern pre-internet. However, I don't understand the point of writing it on a random object. Is it so the item can be returned to you in case it is stolen? Would love to learn more about the reasoning for this.", "comment": "In 84-86 when I was in tech school, they requested our SSN as ID when cashing checks.  I actually had it printed on my checks because it was much easier than writing it out every time.", "upvote_ratio": 80.0, "sub": "AskOldPeople"}669{"thread_id": "undwpj", "question": "I work at a thrift store and my job is to inspect everything that gets donated to make sure we are able to sell it. I've noticed that a lot of items have social security numbers carved into them. I see it a lot with old cameras, but I've also seen it on the bottoms of statues and even on a piano once. It's really confusing to me because my generation was raised to never give out our social security numbers because of identity theft, but I guess that was less of a concern pre-internet. However, I don't understand the point of writing it on a random object. Is it so the item can be returned to you in case it is stolen? Would love to learn more about the reasoning for this.", "comment": "Ignorance and because in the \"good old days\" there was virtually no way for the average criminal to take advantage of having that social security number.  It was not like today where any idiot can strip the other needed information from the internet to be able to do some identity theft.\n\nFor some weird reason, people thought that if the item was stolen, cops could ID you and get the item back to you with your SS number.  That was never true.  In that era, they usually recommended your state and driver's license number be engraved on expensive stuff.  Even that was hit and miss.\n\nNow the cops rarely even try and return stuff--they assume insurance took care of it and just ship it off to auction in most larger cities (because they benefit from auction proceeds in most cases.)", "upvote_ratio": 80.0, "sub": "AskOldPeople"}670{"thread_id": "une32d", "question": "I finished 2/3 of this computer science assignment, but I am stuck on the last part, and to be honest I am not 100% sure what it is asking.  So in part 2 of the assignment I created a a decryption program \u201cdecrypt.cc\u201d (https://pastebin.com/ST21nEY3) that is called from the terminal like this: \u201c$ echo input | ./decrypt 10\u201d (an example: if the input is \u201cROVVY\u201d then the output is \u201cHELLO\u201d).  Part 3 of the assignment is supposed to crack a key, and is based on the decrypt.cc program.  Specifically, you\u2019re used to replicate the decryption code, count the number of E\u2019s in the decrypted text, and print the key that produces the decrypted text with the most E\u2019s.  As a reference, the file encrypted.enc (https://pastebin.com/tsSSquXj ) has been encrypted with the key 15.\nI am unclear on how to do this, and how key is being defined here (is key literally the variable key?  Is it a line?  Is it the x variable?)  Any clarification or tips would be appreciated.", "comment": ">is key literally the variable key?\n\nIt would appear so. More generally, it is the key provided to do encryption / decryption, so the number on the command line in your case.", "upvote_ratio": 30.0, "sub": "cpp_questions"}671{"thread_id": "unehbf", "question": "Hi all, \n\nI'm interested in learning cpp and found [this](https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list) SO post that outlines some books to use whilst learning. However, my question is does the cpp version that the book uses matters all that much to me?\n\nThanks", "comment": "> does the cpp version that the book uses matters all that much to me?\n\nNot as long as you stick to at least C++11.\n\nSubsequent C++ standards generally dont invalidate old ones, they add new features (which may make some older patterns obsolecent).\n\n---\n\nObligatory mention of www.learncpp.com as the best free online resource out there.", "upvote_ratio": 90.0, "sub": "cpp_questions"}672{"thread_id": "unemde", "question": "This question mainly pertains to people in my age group (Millennials) but everyone is welcome to comment!\n\nI was talking to a foreign friend of mine and he recently just started watching old Nickelodeon American sitcoms. (Not really old just shows that some of us in our 20s-30s grew up watching.) Shows like Zoey 101, Drake & Josh, iCarly, etc. He asked me if these shows accurately portray American culture. I said \"Sure\" but I honestly I didn't really think of it. So im asking other fellow Americans if you believe those tv shows are accurate examples of the USA or maybe not?", "comment": "Yes, every court case ends with sending in the dancing lobsters. ^(I wish)", "upvote_ratio": 680.0, "sub": "AskAnAmerican"}673{"thread_id": "unemde", "question": "This question mainly pertains to people in my age group (Millennials) but everyone is welcome to comment!\n\nI was talking to a foreign friend of mine and he recently just started watching old Nickelodeon American sitcoms. (Not really old just shows that some of us in our 20s-30s grew up watching.) Shows like Zoey 101, Drake & Josh, iCarly, etc. He asked me if these shows accurately portray American culture. I said \"Sure\" but I honestly I didn't really think of it. So im asking other fellow Americans if you believe those tv shows are accurate examples of the USA or maybe not?", "comment": "TiL that those shows are \u201cold\u201d and here I am having grown up with \u201cSalute your Shorts\u201d \u201cPete & Pete\u201d and \u201cHey Dude\u201d", "upvote_ratio": 380.0, "sub": "AskAnAmerican"}674{"thread_id": "unemde", "question": "This question mainly pertains to people in my age group (Millennials) but everyone is welcome to comment!\n\nI was talking to a foreign friend of mine and he recently just started watching old Nickelodeon American sitcoms. (Not really old just shows that some of us in our 20s-30s grew up watching.) Shows like Zoey 101, Drake & Josh, iCarly, etc. He asked me if these shows accurately portray American culture. I said \"Sure\" but I honestly I didn't really think of it. So im asking other fellow Americans if you believe those tv shows are accurate examples of the USA or maybe not?", "comment": "For what it's worth I think those shows you named will connect more with younger millennials, I'm in my early 30s and they were all a little bit after my time. I couldn't tell you what any of them were like.", "upvote_ratio": 160.0, "sub": "AskAnAmerican"}675{"thread_id": "unf88w", "question": "TL; DR: How do i display things such as a\\* pathfinding algorithm with c++ (preferable in linux)\n\nSo how do i make a window, where i can display things, such as a grid where i use the pathfinding algorithm a\\* to find the shortest path between a and b. \n\nI know how to do all the coding a\\*, but i don't know how i can display it. If i were to google how to make a\\*, i always tend to find anything else than c++, such as javascript where you do it on a website, but i don't want to do i with javascript because it is so much slower.\n\nBy the way, i have a dual boot (windows for shcool, and linux for programming) and i definetly prefer linux, so i would prefer if there is any other way than visual studio to do this. I have installed eclipse and tried using it, but it doens't have the prebuilt window application thing that visual studio has, and haven't been able to find any tutorials on how to make a window in eclipse (that i can understand).", "comment": "Ui frameworks or libraries: wxwidgets, qt\n\nRendering abstractions: sfml, sdl\n\nRendering api: opengl, dx11, dx12, vulkan\n\nFor a quick job I'd stick with sfml/sdl", "upvote_ratio": 110.0, "sub": "cpp_questions"}676{"thread_id": "unfc4j", "question": "Try this experiment: film your face with your phone as you look to the side and try to move your eyes smoothly across the screen. You can't. All you'll see is *saccadic* eye movement (rapid little darts in eye position).\n\nNext, hold your finger behind your phone and focus on it while you move your finger from one side to the other. You'll see that your eyes move perfectly smooth while they track your finger.\n\nWhy is this the case? I can already imagine evolutionary motivations for it: when we look out into our environment, we are performing **visual search** so rapid, darting eye movements are good for snapping from one area of interest to another. But, when tracking a moving object of interest (such as prey) it is important to be able to smoothly fixate on it.\n\n\nBut my question is, do we know the **cortical or neuromuscular mechanisms** involve in this? Is there some sort of reflex involved?", "comment": "When you fixate on a target you do what\u2019s called a pursuit eye movement as you track it. These are smooth almost involuntarily extra ocular muscle movements to maintain binocular fixation of the retinal image on the fovea (area with the most dense photo receptors)\nWhen you try to voluntarily do the same thing you have no retinal image to tell the brain to fixate on. So it jumps around and cannot track it. \nThese eye movements are more jumpy as you try to find an object to fixate one this is a saccade. The initiation of both come from different areas in the brain. The Frontal eye field initiates both saccades (jumpy eye movement) and smooth pursuit tracking I believe. Could be wrong about that part. It\u2019s been a while since I got out of optometry school.\nHere\u2019s something else that\u2019s interesting. You have involuntary eye muscle movements of a stationary object when your in motion. Look at your phone camera and start turning your head up down left and right. Your eyes will be turning smoothly to track a stationary object without any input from you to move the eyes. This comes from the input from a combination of cranial nerves and is called the vestibulo ocular reflex. It\u2019s like a natural image stabilization for our eyes", "upvote_ratio": 290.0, "sub": "AskScience"}677{"thread_id": "unfdqk", "question": "I ll be travelling to the US soon, and I heard here and there that the testing requirements will be soonish dropped when wanting to fly to the us. But its difficult to search us news when living abroad. So i was wondering if there are any meetings planned or discussions on this topic in the us. When can i expect the testing requirement for fully vaccinated people to be dropped?", "comment": "Anybody saying they know anything for sure regarding covid rules and regs is lying to you.", "upvote_ratio": 1200.0, "sub": "AskAnAmerican"}678{"thread_id": "unfdqk", "question": "I ll be travelling to the US soon, and I heard here and there that the testing requirements will be soonish dropped when wanting to fly to the us. But its difficult to search us news when living abroad. So i was wondering if there are any meetings planned or discussions on this topic in the us. When can i expect the testing requirement for fully vaccinated people to be dropped?", "comment": "Lemme gather my fellow US homies for a quick meeting about this and we\u2019ll get back to you.", "upvote_ratio": 560.0, "sub": "AskAnAmerican"}679{"thread_id": "unfdqk", "question": "I ll be travelling to the US soon, and I heard here and there that the testing requirements will be soonish dropped when wanting to fly to the us. But its difficult to search us news when living abroad. So i was wondering if there are any meetings planned or discussions on this topic in the us. When can i expect the testing requirement for fully vaccinated people to be dropped?", "comment": "We are not privy to the internal meeting schedule of the CDC.", "upvote_ratio": 260.0, "sub": "AskAnAmerican"}680{"thread_id": "unfgrk", "question": "So, I am a qualified researcher in machine learning and am doing my second post-doc in Germany.\n\nNot trying to blow my own trumpet, but I need to set my qualifications straight to ensure that my question is not taken as a casual novice question.\n\nI am well-versed in Python, C++ and Rust. But in machine learning research I have always used Python to experiment when writing all my papers.\n\n​\n\nI now want to establish myself as someone who is a prized asset in ML industry. Apart from my theoretical knowledge and experience with projects, would it help if I develop myself in C++ for machine learning as well ?\n\n​\n\nThis brings me to  the heart of my question : What are the prospects of C++ and Rust for machine learning in industry really ? Is it a prized skill ? I am looking for some pointers from people who are experienced in ML industry.", "comment": "That depends on what exactly you are planning to do. If you're primarily interested in exploring models then I'd stick to Python, the interface is simply much nicer. E.g. if you're doing things \"I'd like to have a layer with feature X, then another layer with Y activation function, then Z more layers, ... and compare that against A's model in our ML football games\".\n\nIf you plan on implementing the underlying libraries like tensorflow or writing the functionalities found in those libraries yourself then you kinda need to go with C++. Or if you're on restricted hardware that doesn't have a python environment or even OS (robotics).\n\nAll current ML frameworks are written in C++ (the Python layer is just the nice to use interface on top) so knowing that helps. You could write those things in Rust too but C++ has a much larger ecosystem.", "upvote_ratio": 90.0, "sub": "cpp_questions"}681{"thread_id": "unfmt7", "question": "There are some really impressive hardware pieces on the market (usually made for specific purposes) that are way beyond their common counterparts (Samsung's new 512GB RAM, some audio cards, network cards that can reach absurd speeds -think I saw this one on LTT, etc), but the one thing they all have in common is that they use PCIe instead of their normal connectors.\nWhy don't we use PCIe for everything (I mean, slowly transition into it) since it is so much better for larger and faster bandwith? That way we open the possibilities for that hardware to come to consumers who want to pay for them or, although not likely because there would hardly be any necessity, become part of the norm as the high-end hardware for enthusiasts.", "comment": "There seems to be a bit of a disconnect between the title of your question and the body. As you've already noticed, hardware manufacturers do use PCIe where it makes sense to do so. They don't use it *everywhere* because of cost-benefit tradeoffs: either PCIe isn't better than the alternatives, or it isn't *sufficiently* better to justify the additional cost.\n\nFor example:\n\n* Hardware that can actually transmit/receive data over a PCIe bus at those blistering speeds is expensive, both in terms of silicon die area and power consumption. That means it costs extra to add PCIe support to a peripheral. It also means your CPU can only support a limited number of PCIe lanes.\n\n* Many devices don't *need* lots of bandwidth, and can easily get away with using a much slower bus such as USB, I2C or SPI. For instance, keyboards, mice, fan controllers, BIOS flash chips, etc.\n\n* PCIe is not unequivocally superior to the alternatives. For instance, it requires many more signal lines than USB, and the lines have to be carefully designed and laid out on circuit boards to deal with things like impedance matching. (There are PCIe \"extension cables\", but they're vastly more expensive than USB cables.) \n\n* On the other hand, you wouldn't want to access all of your system's RAM over PCIe. As the name suggests, RAM performance in practice is largely constrained by random-access latency, and PCIe has much greater latency than a standard SDRAM bus. The Samsung PCIe RAM module that you mentioned is designed for specialized workloads that need more RAM than would otherwise be physically possible, and are willing to pay a latency penalty for it.\n\n>  but the one thing they all have in common is that they use PCIe instead of their normal connectors\n\nI'm not sure what you mean by \"normal connectors\" -- PCIe *is* normal for things like sound cards and NICs.", "upvote_ratio": 130.0, "sub": "AskComputerScience"}682{"thread_id": "unfscf", "question": "Hey folks so I am currently going through the Rust book and had this doubt. So if I have the following code -\n\n    enum Message {\n        Quit,\n        Move { x: i32, y: i32 },\n        Write(String),\n        ChangeColor(i32, i32, i32),\n    }\n    \n    impl Message {\n        fn move_call(&self) {\n            println!(\"{}, {}\", self.x, self.y);\n        }\n    }\n    fn main() {\n        let direction = Message::Move { x: 32, y: 45 };\n        direction.move_call()\n    }\n\nI want to access the values of x and y in the move\\_call method but I cannot. I get -\n\n    error[E0609]: no field `x` on type `&Message`\n      --> src\\main.rs:16:33\n       |\n    16 |         println!(\"{}, {}\", self.x, self.y)\n       |                                 ^\n    \n    error[E0609]: no field `y` on type `&Message`\n      --> src\\main.rs:16:41\n       |\n    16 |         println!(\"{}, {}\", self.x, self.y)\n\nI checked what self is representing using Debug trait which is -\n\n    Move { x: 32, y: 45 }\n\nAnd I know that we can access fields of a struct using dot notation-\n\n    struct Move {\n        x: i32,\n        y: i32,\n    }\n    \n    let dir = Move {\n            x: 21,\n            y: 32\n      };\n    \n    println!(\"{}, {}\", dir.x, dir.y)\n\nSo why is it in the enum case I cannot access x and y??\n\n​\n\nMy understanding here and I could be wrong is that we cannot just simply access one of the variants of the enum. The code wants us to write the cases for the other variants as well hence we need to resort to a match expression.", "comment": ">My understanding here and I could be wrong is that we cannot just simply access one of the variants of the enum. The code wants us to write the cases for the other variants as well hence we need to resort to a match expression.\n\nYeap, that's exactly right.\n\nSo your `move call` could look like this:\n```\nimpl Message {\n    fn move_call(&self) {\n        match self {\n            // destructuring assignment\n            Message::Move { x, y } => println!(\"{}, {}\", x, y),\n            // ignore all other cases for now\n            _ => (),\n        }\n    }\n}\n```\n\nLink to full working example in Rust playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=09d160baf48ba48577f30a5a729551ae", "upvote_ratio": 70.0, "sub": "LearnRust"}683{"thread_id": "unglm9", "question": "I\u2019m going to the US and Canada for 27 days total in the summer and was wondering if around $50 a day will be enough to enjoy myself there. I\u2019m aware I\u2019d be able to survive on this amount but was wondering if eating out, drinking and clubbing occasionally could be covered by this amount. I\u2019m going to NYC, Toronto and LA and am aware of just how expensive some of these places can get. If $50 is too little, then what amount would be recommended?\n\nEdit: Accommodation and flights have been sorted.\n\nTo rephrase the question differently, is ~$1,300 enough for 27 days?\n\nAlso how could I survive on $50 then?", "comment": "> survive\n\nAbsolutely, no problem.\n\n> drinking\n\nOf course, as long as you're not picky!\n\n> clubbing \n\nUhhhh....\n\n> NYC, Toronto and LA\n\nI give you approximately 1.5 days.", "upvote_ratio": 22070.0, "sub": "AskAnAmerican"}684{"thread_id": "unglm9", "question": "I\u2019m going to the US and Canada for 27 days total in the summer and was wondering if around $50 a day will be enough to enjoy myself there. I\u2019m aware I\u2019d be able to survive on this amount but was wondering if eating out, drinking and clubbing occasionally could be covered by this amount. I\u2019m going to NYC, Toronto and LA and am aware of just how expensive some of these places can get. If $50 is too little, then what amount would be recommended?\n\nEdit: Accommodation and flights have been sorted.\n\nTo rephrase the question differently, is ~$1,300 enough for 27 days?\n\nAlso how could I survive on $50 then?", "comment": "Visiting the 3 most expensive cities on the continent. I\u2019d plan for double or even triple your assessment or get creative. Outside of those areas you might be able to get by with that though\u2026", "upvote_ratio": 9870.0, "sub": "AskAnAmerican"}685{"thread_id": "unglm9", "question": "I\u2019m going to the US and Canada for 27 days total in the summer and was wondering if around $50 a day will be enough to enjoy myself there. I\u2019m aware I\u2019d be able to survive on this amount but was wondering if eating out, drinking and clubbing occasionally could be covered by this amount. I\u2019m going to NYC, Toronto and LA and am aware of just how expensive some of these places can get. If $50 is too little, then what amount would be recommended?\n\nEdit: Accommodation and flights have been sorted.\n\nTo rephrase the question differently, is ~$1,300 enough for 27 days?\n\nAlso how could I survive on $50 then?", "comment": "You're gonna need to quadruple that for la and NYC idk bout Toronto", "upvote_ratio": 6460.0, "sub": "AskAnAmerican"}686{"thread_id": "ungm6s", "question": "also if you're not flaired tell us what region this is applicable to", "comment": "How much does their shittiest beer cost? I'm not necessarily going to order it, but it tends to correlate with pretentiousness in my experience.", "upvote_ratio": 310.0, "sub": "AskAnAmerican"}687{"thread_id": "ungm6s", "question": "also if you're not flaired tell us what region this is applicable to", "comment": "Places that barely pass health and safety inspections>>>>>>\n\nBest food on earth", "upvote_ratio": 310.0, "sub": "AskAnAmerican"}688{"thread_id": "ungm6s", "question": "also if you're not flaired tell us what region this is applicable to", "comment": "For a bar, I\u2019m mostly looking for the atmosphere. I\u2019ll sometimes test them a bit by ordering a basic cocktail like an old fashioned. If they screw that up, I know to order beer from them on. I once ordered a Manhattan and got a shot of bourbon with a cherry in it. \n\nFor restaurants, I look online to see the menu and reviews.", "upvote_ratio": 180.0, "sub": "AskAnAmerican"}689{"thread_id": "ungxwc", "question": "Does the atmosphere bulge at the equator like the land/water does?", "comment": "Yes.", "upvote_ratio": 120.0, "sub": "AskScience"}690{"thread_id": "unhzm3", "question": "Can be entrees drinks or sides or all three together", "comment": "Cheddar Bay Biscuits from Red Lobster", "upvote_ratio": 2450.0, "sub": "AskAnAmerican"}691{"thread_id": "unhzm3", "question": "Can be entrees drinks or sides or all three together", "comment": "The blooming onions at Outback from like 25 years ago.  \nAnd their bread and butter.", "upvote_ratio": 1590.0, "sub": "AskAnAmerican"}692{"thread_id": "unhzm3", "question": "Can be entrees drinks or sides or all three together", "comment": "The All-Star Special at Waffle House can't be beat. Huge waffle, 2 eggs, toast, hash browns, and your choice of one - bacon, sausage or ham for 7.50 in my neck of the woods", "upvote_ratio": 1370.0, "sub": "AskAnAmerican"}693{"thread_id": "uni1tr", "question": "Does anyone have an example of erathostenes sieve for only odd numbers? like v[10] corresponds to 19 and so on?", "comment": "Im confused how an erathostenes sieve with even numbers would look like", "upvote_ratio": 30.0, "sub": "cpp_questions"}694{"thread_id": "uni6sa", "question": "Currently, I am practicing my Java and DSA skills on [hyperskill.org](https://hyperskill.org), although they are fantastic for Java and Python, unfortunately C++ is not available on their website.\n\n​\n\nDoes anyone know whether there is any website that can provide c++ like Hyperskills?", "comment": "Why is there no rules on this subreddit against thinly veiled marketing of sketchy Chinese websites?\n\nIncase you request was in at the very least somewhat genuine, just try to do the same exercises in C++.\n\nEDIT: OP corrected a typo in their post, website linked originally was incorrect.", "upvote_ratio": 40.0, "sub": "cpp_questions"}695{"thread_id": "unibap", "question": "I was thinking about this between delicious sneezing episodes. Anecdotal, but I know immigrants who claim they\u2019ve never had issues with pollen in their home countries but after arriving here they suddenly started succumbing to Big Pollen. What gives?\n\nSide note, the people I\u2019ve asked have been mainly from warmer countries", "comment": "[https://www.immunology.org/news/molecular-mechanism-allergies-discovered](https://www.immunology.org/news/molecular-mechanism-allergies-discovered)\n\n\"For a long time, we\u2019ve been aware that allergies occur much more frequently in Western countries\"\n\nDeveloped countries suffer from allergies more often.", "upvote_ratio": 70.0, "sub": "AskScience"}696{"thread_id": "unikqz", "question": "Humans are very culturally different across the globe. They learn different things from their culture, then think and act a certain way because of what they\u2019ve learned and how they were raised. Are there any examples of animals who have similarly profound cultural differences based on where they are from?", "comment": "[Cultural change in animals](https://www.nature.com/articles/s41599-019-0271-4)\n\n[Strongest evidence of animal culture in monkeys and whales](https://www.science.org/content/article/strongest-evidence-animal-culture-seen-monkeys-and-whales)\n\n[Geographical and cultural differences in orangutan behavior](https://www.sciencedirect.com/science/article/pii/S0960982211010190)\n\n[Geographical difference in bat echolocation](https://pubmed.ncbi.nlm.nih.gov/25664901/)\n\nFor more examples Google search cultural difference animals  or   geographical differences animal behavior", "upvote_ratio": 90.0, "sub": "AskScience"}697{"thread_id": "unikqz", "question": "Humans are very culturally different across the globe. They learn different things from their culture, then think and act a certain way because of what they\u2019ve learned and how they were raised. Are there any examples of animals who have similarly profound cultural differences based on where they are from?", "comment": "You can see it all over the place once you realize that culture doesn't have to look as extravagant or complex as humans happen to have taken it. Cultural knowledge are ideas and behaviors that, once learned, spread through certain populations usually because they are proven useful (even though they sometimes stick around even after they are stop being useful).\n\nOur primate cousins are well-known to exhibit these sorts of behaviors. Many learn all about what foods to eat, where to find them, when and how to eat them from their parents, meaning that rehabilitating orphaned primates usually requires teaching them this knowledge before they can be released back into the wild.\n\nBut it's not just that different species of primates have different diets. With many, especially apes, we see that different groups in one region have developed different dietary preferences and processing methods than other groups in other regions. Take orangutans: some populations use leaves as napkins while others do not. Some may use leaves as cushions, instead, lining a gnarly branch with them before sitting down. Others use leaves like gloves to handle thorny branches. Different sized leaves may serve difference purposes, or a whole branch of them might be used as an umbrella. The point is that not all orangutans exhibit all these behaviors, but orangutans tend to exhibit more similar behaviors the more they share their ranges with each other, which more than suggests that they share and mimic one another's good ideas.\n\nSimilar examples of culture is also well documented in chimpanzees, bonobos, and gorillas. Gibbons sing, and they learn their songs from their parents. The practice of washing sweet potatoes in the ocean spread through a group of macaques after just one of them did so.\n\nFrans de Waal has a great book called \"Are We Smart Enough to Know How Smart Animals Are?\" that goes into many of these examples and more, with representatives from throughout the animal kingdom.", "upvote_ratio": 70.0, "sub": "AskScience"}698{"thread_id": "unildl", "question": "Hi, I hope this isn't the wrong place to ask this.  I'm a college student about to start my internship. I've been thinking about getting something like the rocket book or an e-ink tablet, like the supernote or remarkable for school, and was wondering how often a notebook comes in handy in a professional environment before I decide, one,  if I should purchase one now, or wait until my next semester after the summer, as well a if I should spend more money on the e-ink or less in the rocket book since I only have the one semester left.\n\nAny advice is appreciated! Sorry if this is the wrong place to ask.", "comment": "It sort of depends on the job and the individual. I've always been happy with just a smartphone, to jot a couple reminders or take a picture of a whiteboard discussion. I know people with my exact same role though who absolutely depend on a notebook.\n\nOn a more general note, workplaces are much more collaborative than school, and you don't typically go to meetings where there is a ton of information dispensed that you'll be expected to remember. If I were you, I would stick to a paper notebook until I understood for myself what the environment is like.", "upvote_ratio": 30.0, "sub": "AskProgramming"}699{"thread_id": "unildl", "question": "Hi, I hope this isn't the wrong place to ask this.  I'm a college student about to start my internship. I've been thinking about getting something like the rocket book or an e-ink tablet, like the supernote or remarkable for school, and was wondering how often a notebook comes in handy in a professional environment before I decide, one,  if I should purchase one now, or wait until my next semester after the summer, as well a if I should spend more money on the e-ink or less in the rocket book since I only have the one semester left.\n\nAny advice is appreciated! Sorry if this is the wrong place to ask.", "comment": "I just use a paper notepad for scrawling down stuff during meetings.\n\nIt depends on the job really.", "upvote_ratio": 30.0, "sub": "AskProgramming"}700{"thread_id": "unj838", "question": "Watched a documentary there called American Factory where a huge corporation spy\u2019s on its workers to see who\u2019s in a union and find ways to fire those who support it. In school I was also taught that when the mafia was prevalent they were able to corrupt a number of unions. Do you feel any unions in the US are effective nowadays. Here in Ireland we really don\u2019t have a strong union for any industry bar the Luas industry. Often what happens is a small minority in a union for one industry will feel not cared for and will form a new union and send conflicting messages and demands to the employers and government.", "comment": ">Do you feel any unions in the US are effective nowadays.\n\nIt's hit or miss. I've worked with union guys that worked hard and were extremely professional. I've also worked with union guys that were so drunk by lunch they couldn't walk and they still didn't get fired. \n\n>huge corporation spy\u2019s on its workers to see who\u2019s in a union\n\nThere's no need to spy, it's pretty common knowledge whose in a union in at a business", "upvote_ratio": 220.0, "sub": "AskAnAmerican"}701{"thread_id": "unj838", "question": "Watched a documentary there called American Factory where a huge corporation spy\u2019s on its workers to see who\u2019s in a union and find ways to fire those who support it. In school I was also taught that when the mafia was prevalent they were able to corrupt a number of unions. Do you feel any unions in the US are effective nowadays. Here in Ireland we really don\u2019t have a strong union for any industry bar the Luas industry. Often what happens is a small minority in a union for one industry will feel not cared for and will form a new union and send conflicting messages and demands to the employers and government.", "comment": "> spy\u2019s on its workers to see who\u2019s in a union and find ways to fire those who support it.\n\nHaven't seen the movie, but I suspect that they were trying to identify workers who were trying to form a *new* union, rather than workers who were already part of a pre-existing union. It's very common for companies to discourage workers from forming unions, because unions are intended to force changes that benefit the workers at the expense of the company. It is illegal to fire a worker for trying to form or encourage a union, but companies can legally fire workers for all manner of other petty reasons, so union promoters should expect to be under increased scrutiny. Anyway, once the union exists, there's no secret about who's a member.\n\nI've never been a member of a union. I've worked alongside union members in various job functions. Some unions are a pain in the ass to deal with, some are not. Some are effective at improving working conditions, some are not. Some are corrupt, some are not.", "upvote_ratio": 190.0, "sub": "AskAnAmerican"}702{"thread_id": "unj838", "question": "Watched a documentary there called American Factory where a huge corporation spy\u2019s on its workers to see who\u2019s in a union and find ways to fire those who support it. In school I was also taught that when the mafia was prevalent they were able to corrupt a number of unions. Do you feel any unions in the US are effective nowadays. Here in Ireland we really don\u2019t have a strong union for any industry bar the Luas industry. Often what happens is a small minority in a union for one industry will feel not cared for and will form a new union and send conflicting messages and demands to the employers and government.", "comment": "Some unions prey on the employees that they're supposed to support. \n\nSome unions are wildly corrupt.\n\nSome are inefficient and obstructionist.\n\nSome are mostly good, but made mistakes.\n\nAnd some are pretty great.\n\nI was in a union that was corrupt and preyed on their own people. I was offered a job selling insurance to union members where the insurance company deliberately misrepresented itself and the coverage and bribed the union bosses to look the other way (I declined). I'm currently in a great union. If I wasn't working here, I wouldn't believe that a union could be this good, working with the business as a partner, not looking for problems but addressing them when they come up, and defending the employees when needed (which is rare because the business isn't shady).", "upvote_ratio": 130.0, "sub": "AskAnAmerican"}703{"thread_id": "unjawi", "question": "Would you have to have an older sample too? How's that work?\n\nEdit: You guys are very informed in your fields. I'm impressed. A lot of academic communities act aggressively to those that are uninformed. Thank you all for your answers. Almost like I would need a few years to comprehend your discussions adequately. Weird, huh?", "comment": "No, you cannot see them with standard DNA sequencing. Although egenetic changes do modify the DNA, they do not modify the actual sequence. You can detect epigenetic modifications with techniques such as chromatin IP, bisulfite sequencing, ATAC-sequencing, and Western blotting, among others; the technique you use depends on the precise modification you're interested in and how sensitive you need it to be.", "upvote_ratio": 380.0, "sub": "AskScience"}704{"thread_id": "unjawi", "question": "Would you have to have an older sample too? How's that work?\n\nEdit: You guys are very informed in your fields. I'm impressed. A lot of academic communities act aggressively to those that are uninformed. Thank you all for your answers. Almost like I would need a few years to comprehend your discussions adequately. Weird, huh?", "comment": "There is the added complication that there may be tissue-specific differences in epigenetic marks, so you'd need to sample across multiple locations (unlike the case for your genomic sequence, which with some exceptions should be about the same in every cell in your body).", "upvote_ratio": 50.0, "sub": "AskScience"}705{"thread_id": "unlj00", "question": "~43% of sites worldwide use Wordpress, however 99% of the front end job descriptions I\u2019ve seen never mention Wordpress and instead mention JS frameworks.\n\n1.\tWhy do you think that is?\n2.\tAm I pigeonholing myself if I were to take a job where they use Wordpress instead of JS framework?\n3.\tSay I take the job and stick with it for 2-3 years where I\u2019m gaining experience with Wordpress, PHP, vanilla JS, CSS/Sass - do you think it\u2019d be hard to switch into a development role using something like React?", "comment": ">1.\tWhy do you think that is?\n\nMost WordPress sites need minimal development. 90% of it can be managed by a random guy in marketing. That's actually one of the main selling points of WordPress: you don't need to hire a lot of expensive developers.", "upvote_ratio": 60.0, "sub": "AskProgramming"}706{"thread_id": "unlj00", "question": "~43% of sites worldwide use Wordpress, however 99% of the front end job descriptions I\u2019ve seen never mention Wordpress and instead mention JS frameworks.\n\n1.\tWhy do you think that is?\n2.\tAm I pigeonholing myself if I were to take a job where they use Wordpress instead of JS framework?\n3.\tSay I take the job and stick with it for 2-3 years where I\u2019m gaining experience with Wordpress, PHP, vanilla JS, CSS/Sass - do you think it\u2019d be hard to switch into a development role using something like React?", "comment": "Because companies don't generally need full time employees to build them a static website, and keep it going. The majority of Wordpress sites are built by design agencies and lone wolf designers, or people doing it themselves. This isn't in any way to denigrate Wordpress or the people that use it, by the way. Far from it. But once a WP site is up, the work of the person designing it is largely done.", "upvote_ratio": 30.0, "sub": "AskProgramming"}707{"thread_id": "unlolu", "question": "Solved:\n\nThank you for your answers, I found perf, gprof, gprof2dot and hotspot, that helps a lot. This tools are available in Linux (Ubuntu/Fedora).\n\n\\####################\n\nHi.\n\nI don't know how to implement this question. The thing is, I am following some tutorials for developing games with SDL2: Madsycode(youtube), Limeoats(youtube), Pikuma(was in Udemy, now he has his own page).\n\n* One of the many things that I like in the Pikuma tutorial, is that the programs is so lightweight, ECS, integration with Lua.\n* In the Limeoats, I like that you can print with animations tilemaps and some physics.\n* With Madsycode, I like the organization of the code.\n\n​\n\n    This is each game running and measuring using htop, bpytop, btop.\n    | SDL    | threads | RAM | CPU             |\n    | ------ | ------- | --- | --------------- |\n    | Mad    | 12      | 79M | (2.5 to 3.5)    |\n    | Lime   | 11      | 69M | (1.9 to 2.6)    |\n    Pikuma doesn't measured because its the lighter :D\n\n**But,** comparing Mad and lime, the consume are almost similar. Is there a way to know which thread/method/function is consuming more? Or, Which method do you use for lightweight your program?", "comment": "For windows, I love perfview. Steep learning curve though but it will serve you well to invest the time.", "upvote_ratio": 30.0, "sub": "cpp_questions"}708{"thread_id": "unn41s", "question": "What would you personally have done more of in your younger life so that you can feel more fulfilled now?", "comment": "Learned more about finance and invested more, sooner. I\u2019m not doing badly now, but I could have done much better, much earlier if I\u2019d made some relatively small changes to my money habits.", "upvote_ratio": 920.0, "sub": "AskOldPeople"}709{"thread_id": "unn41s", "question": "What would you personally have done more of in your younger life so that you can feel more fulfilled now?", "comment": "Say no about 10x more often. I can't stress this enough. If you feel like somebody can't handle your no, then you are being bullied, pushed around, manipulated, etc by that person. It's a huge red flag. \n\nAddress elephants in rooms every time I see one (because I'm gonna be the one to do it anyway. I may as well get it over with asap.)\n\nSelf-care. I still suck at it, but I think I probably had a better chance of making it habitual if I had recognized the need 30 years ago. \n\nBe less shy and afraid to participate in things.", "upvote_ratio": 760.0, "sub": "AskOldPeople"}710{"thread_id": "unn41s", "question": "What would you personally have done more of in your younger life so that you can feel more fulfilled now?", "comment": "Education, education, education. \n\nHave the skills to support yourself. Never depend on a spouse or SO to pay the rent.", "upvote_ratio": 660.0, "sub": "AskOldPeople"}711{"thread_id": "unnbft", "question": "Pretty much just the title. Any help would be appreciated just wondering how much of a benefit it is when looking for a job", "comment": "It's required for certain government or government contractor jobs. However, (in the U.S. at least), you can't just get a clearance if you want one. You require a reason and a sponsor for the clearance. That means you can't get a security clearance until you have landed a job that requires one.", "upvote_ratio": 120.0, "sub": "AskProgramming"}712{"thread_id": "unnbft", "question": "Pretty much just the title. Any help would be appreciated just wondering how much of a benefit it is when looking for a job", "comment": "Already having been cleared in the past is gets you a pretty good leg up on other applicants, and being eligible at all opens up opportunities in a smaller applicant pool than if you aren't, in aerospace (and other military contractors, but the big ones that are hiring in droves are the aerospace people). \n\nBut you either already have one or you don't. It's not like you can just apply for one.", "upvote_ratio": 30.0, "sub": "AskProgramming"}713{"thread_id": "unngx6", "question": "Do most world maps look like [this](https://geology.com/world/world-map.shtml) or like [this](https://www.mapshop.com/world-physical-map-with-wonders-pacific-centered-light-oceans/) \n\nI\u2019ve seen some people say the US uses the world map that splits Europe in half and the US is in the middle, but I don\u2019t think that people actually use that.", "comment": "The first one is pretty standard.", "upvote_ratio": 1680.0, "sub": "AskAnAmerican"}714{"thread_id": "unngx6", "question": "Do most world maps look like [this](https://geology.com/world/world-map.shtml) or like [this](https://www.mapshop.com/world-physical-map-with-wonders-pacific-centered-light-oceans/) \n\nI\u2019ve seen some people say the US uses the world map that splits Europe in half and the US is in the middle, but I don\u2019t think that people actually use that.", "comment": "New world on the left, Old world on the right is pretty standard.", "upvote_ratio": 1080.0, "sub": "AskAnAmerican"}715{"thread_id": "unngx6", "question": "Do most world maps look like [this](https://geology.com/world/world-map.shtml) or like [this](https://www.mapshop.com/world-physical-map-with-wonders-pacific-centered-light-oceans/) \n\nI\u2019ve seen some people say the US uses the world map that splits Europe in half and the US is in the middle, but I don\u2019t think that people actually use that.", "comment": ">I\u2019ve seen some people say the US uses the world map that splits Europe in half and the US is in the middle, but I don\u2019t think that people actually use that. \n\nI think that is a type of nautical map, and it's done so both the Atlantic and Pacific can be seen in their entirety", "upvote_ratio": 760.0, "sub": "AskAnAmerican"}716{"thread_id": "uno33m", "question": "So i came across AWS and i wanted to know to know if amazon hires those without experience in this field.\nI wanna learn a lot about AWS from cloud Practioner, developer and devops engineer, i know amazon has resources on their webistes for this but if i were to pass my AWS exam(s) what will the chances be of getting hired in this area", "comment": "Maybe work for a Fortune 500 then transfer into the role like I did better option that wait if you wait a little bit skips all the It low wages stuff", "upvote_ratio": 70.0, "sub": "ITCareerQuestions"}717{"thread_id": "uno33m", "question": "So i came across AWS and i wanted to know to know if amazon hires those without experience in this field.\nI wanna learn a lot about AWS from cloud Practioner, developer and devops engineer, i know amazon has resources on their webistes for this but if i were to pass my AWS exam(s) what will the chances be of getting hired in this area", "comment": "You may be able to find an junior level AWS position like this one.\n\n[https://lensa.com/junior-cloud-engineer--aws-python-rust-java-jobs/des-moines/jd/bc90f1ba802f35dc09592275490716ae?utm\\_campaign=google\\_jobs\\_apply&utm\\_source=google\\_jobs\\_apply&utm\\_medium=organic](https://lensa.com/junior-cloud-engineer--aws-python-rust-java-jobs/des-moines/jd/bc90f1ba802f35dc09592275490716ae?utm_campaign=google_jobs_apply&utm_source=google_jobs_apply&utm_medium=organic)\n\nIts not directly with AWS, but its a start.  That being said, you may have to get some formal IT experience if you cannot break in this way.  I would advise looking for other entry level IT positions as well as throwing your resume to junior level AWS positions as well.", "upvote_ratio": 50.0, "sub": "ITCareerQuestions"}718{"thread_id": "unof2v", "question": "Hey guys, I am a soon to be physics grad, and while I have always enjoyed coding I do think I am a core science at my heart. So why programming? Because I need the money to sustain myself and pay my way through a masters, which can be quite expensive. Also, I need a break from physics for a while. Also can't stay with my parents no more. Bunch of stuff. \n\nSo I wanna know which programming language should I focus and learn in the next 6 months in the hope of landing an alright job. I can program in python, C++ up until linked lists etc., and I have a solid understanding of control flow for most languages, and thus my confidence that I'll understand most languages. Also, the answers will help me get a nerve of what the programming world looks like right now and what is in demand.\n\nAny and all suggestions/criticism welcome.\n\n​\n\nPS: I'm in the UK if that helps.", "comment": "What the heck does \u201cup until linked lists\u201d mean?\n\nThat you can\u2019t write code more complex than a linked list? Read it? Understand it?\n\nAlso, how are you even defining \u201cmore complex\u201d, if that\u2019s even what you meant?\n\nAnd, \u201cgood understanding of control flow\u201d? I\u2019m no physicist, but sounds like to me: \u201cI have a good understanding of F = ma. What does the particle physics market look like, and what kinda job can I get at CERN??\u201d", "upvote_ratio": 30.0, "sub": "AskProgramming"}719{"thread_id": "unogs1", "question": "I've made a small CLI program in python that solves a problem for me, and could be useful to others. It takes a .json file and converts an array within it to a csv to be edited, then you can send the csv back to overwrite the original array with the new key value pairs in the csv file. There's a few other minor things, but that's the gist of it.\n\nNow, I would like to monetize it. This script solves a problem I have with software that's $500/year, so I feel I can sell a few of these. Problem is, I'm not sure how to go about it.\n\nAbout me, I've published an android app in kotlin. I'm relatively familiar with kotlin and a little of python. I could probably pickup enough java quickly to get it done there. I've tried using tkinter to build a gui in python, but it's turning out to be way more work than I expected, and I don't know how I could monetize an .exe without having users just share the executable, circumventing having to pay for it. I would like to avoid having to manage my own backend for validation (hence using google auth).\n\nI thought of creating a web app that uses google authentication, but I can't find much information about how to do that (perhaps I am not looking in the right places... I don't know what I don't know, you know?) I've used apps script extensively to automate and log data (from g-services as well as rpi's).\n\nI guess my question is, how would you do this? It needs to accept a file from the user, ask some questions, generate a new file with that information, and spit out that different file to the user. I'm open to learning some of a new language if it's going to be easier, but would like to stick with kotlin/java/python if possible.", "comment": "Open source it, put it up on github, use it as motivation to either get a higher paying job or a better increase from your employer. Profit!", "upvote_ratio": 80.0, "sub": "AskProgramming"}720{"thread_id": "unogs1", "question": "I've made a small CLI program in python that solves a problem for me, and could be useful to others. It takes a .json file and converts an array within it to a csv to be edited, then you can send the csv back to overwrite the original array with the new key value pairs in the csv file. There's a few other minor things, but that's the gist of it.\n\nNow, I would like to monetize it. This script solves a problem I have with software that's $500/year, so I feel I can sell a few of these. Problem is, I'm not sure how to go about it.\n\nAbout me, I've published an android app in kotlin. I'm relatively familiar with kotlin and a little of python. I could probably pickup enough java quickly to get it done there. I've tried using tkinter to build a gui in python, but it's turning out to be way more work than I expected, and I don't know how I could monetize an .exe without having users just share the executable, circumventing having to pay for it. I would like to avoid having to manage my own backend for validation (hence using google auth).\n\nI thought of creating a web app that uses google authentication, but I can't find much information about how to do that (perhaps I am not looking in the right places... I don't know what I don't know, you know?) I've used apps script extensively to automate and log data (from g-services as well as rpi's).\n\nI guess my question is, how would you do this? It needs to accept a file from the user, ask some questions, generate a new file with that information, and spit out that different file to the user. I'm open to learning some of a new language if it's going to be easier, but would like to stick with kotlin/java/python if possible.", "comment": "Quite frankly, this sounds like the kind of quick script that folks bang out every day.\n\nHowever, does this accomplish something that is critical to whatever processes the workflow involving the licensed software requires, and is it something that would normally be done many times during a given project?\n\nIf so, the simplest approach would be to build the functionality into a webapp, using a framework that supports authentication (Laravel, etc), and can be integrated with a payment processor (Square, etc).\n\nIf the solution you provide is cost-effective, you *might* make something from it. No harm in trying.\n\nBy building a webapp, instead of a standalone application, you don\u2019t have to worry about space pirates.", "upvote_ratio": 50.0, "sub": "AskProgramming"}721{"thread_id": "unoruu", "question": "Let me give some example:\n\n    int a = 3;\n    #ifdef a\n    cout << a;\n    #else\n    cout << (++a);\n    #endif\n\nWith the printed result `4`.\n\nBased on this example, I assume that preprocessor symbols are not the same as postprocessor symbols, AKA the `a` in `#ifdef a` isn't the same as the `a` in `int a = 3;`. I make this assumption, because if they were the same, I would assume `#ifdef a` to be a branch that is hit rather than missed. But evidently it missed.\n\nSo in order to test that assumption, I make a new example:\n\n    #define a\n    int a = 3;\n    #ifdef a\n    cout << a;\n    #else\n    cout << (++a);\n    #endif\n\nSince I believe the two `a`s to be separate, I expect this to compile. It does not.\n\nSo now I have evidence both for and against the idea that these two symbols `a` are the same.\n\n​\n\nSomebody please tell me what the hell is going on here, I don't understand.", "comment": "The preprocessor doesn't give a flying crap about your C++ code, other than being syntactically compatible.\n\n> \\#define a\n\n`a` identifiers are now replaced with nothing. You can check by dumping the preprocessed output.\n\nhttps://www.learncpp.com/cpp-tutorial/introduction-to-the-preprocessor/", "upvote_ratio": 230.0, "sub": "cpp_questions"}722{"thread_id": "unoruu", "question": "Let me give some example:\n\n    int a = 3;\n    #ifdef a\n    cout << a;\n    #else\n    cout << (++a);\n    #endif\n\nWith the printed result `4`.\n\nBased on this example, I assume that preprocessor symbols are not the same as postprocessor symbols, AKA the `a` in `#ifdef a` isn't the same as the `a` in `int a = 3;`. I make this assumption, because if they were the same, I would assume `#ifdef a` to be a branch that is hit rather than missed. But evidently it missed.\n\nSo in order to test that assumption, I make a new example:\n\n    #define a\n    int a = 3;\n    #ifdef a\n    cout << a;\n    #else\n    cout << (++a);\n    #endif\n\nSince I believe the two `a`s to be separate, I expect this to compile. It does not.\n\nSo now I have evidence both for and against the idea that these two symbols `a` are the same.\n\n​\n\nSomebody please tell me what the hell is going on here, I don't understand.", "comment": "The pre-processor is an entirely separate language applied to the source text before the C++ compiler sees it.  The preprocessor macros are independent of the language identifiers.  In the first example, there is no `a` preprocessor macro defined, so the `#ifdef` branch is elided from the source text as seen by the compiler and it sees:\n\n    int a = 3;\n    cout << (++a);\n\nAnd thus prints out `4`.  In the second example, you've defined a preprocessor macro `a` to be an empty string. The preprocessor spits out the text:\n\n    int = 3;\n    cout << ;\n\nWhich will not compile.", "upvote_ratio": 130.0, "sub": "cpp_questions"}723{"thread_id": "unoruu", "question": "Let me give some example:\n\n    int a = 3;\n    #ifdef a\n    cout << a;\n    #else\n    cout << (++a);\n    #endif\n\nWith the printed result `4`.\n\nBased on this example, I assume that preprocessor symbols are not the same as postprocessor symbols, AKA the `a` in `#ifdef a` isn't the same as the `a` in `int a = 3;`. I make this assumption, because if they were the same, I would assume `#ifdef a` to be a branch that is hit rather than missed. But evidently it missed.\n\nSo in order to test that assumption, I make a new example:\n\n    #define a\n    int a = 3;\n    #ifdef a\n    cout << a;\n    #else\n    cout << (++a);\n    #endif\n\nSince I believe the two `a`s to be separate, I expect this to compile. It does not.\n\nSo now I have evidence both for and against the idea that these two symbols `a` are the same.\n\n​\n\nSomebody please tell me what the hell is going on here, I don't understand.", "comment": "    #define a\n\nmeans replace `a` with nothing.\n\nSo the next line becomes\n\n    int = 3\n\nwhich is meaningless.\n\n`-E` is your friend : https://godbolt.org/z/MsG3EM4Wr", "upvote_ratio": 40.0, "sub": "cpp_questions"}724{"thread_id": "unoyir", "question": "So I'm an experienced self taught dev working in the software industry for the past 5 years. My experience with programming includes JS/TS (React), Python and Go. I've been looking to learn a new programming language in my spare time and I'm thinking to branching into a systems/non-gc programming language but im not sure which to pick. This will be half learning exercise, half increasing my skills to further increase my employability. \n\nI've thought about C, C++, Rust, Nim and potentially Zig although i think C (been told everyone should learn this language to understand how computers work but probably wont get me a job) and Rust are on my shortlist", "comment": "C", "upvote_ratio": 40.0, "sub": "AskProgramming"}725{"thread_id": "unoyir", "question": "So I'm an experienced self taught dev working in the software industry for the past 5 years. My experience with programming includes JS/TS (React), Python and Go. I've been looking to learn a new programming language in my spare time and I'm thinking to branching into a systems/non-gc programming language but im not sure which to pick. This will be half learning exercise, half increasing my skills to further increase my employability. \n\nI've thought about C, C++, Rust, Nim and potentially Zig although i think C (been told everyone should learn this language to understand how computers work but probably wont get me a job) and Rust are on my shortlist", "comment": "I'd say C all the way. There are some languages that are arguably better or nicer, but C really forces you to learn it well.", "upvote_ratio": 30.0, "sub": "AskProgramming"}726{"thread_id": "unp4h2", "question": "Why are there multiple programming languages?", "comment": "We've been designing programming languages for about 70 years, and have learned a thing or two in that time. Following from that, researchers like playing with new ideas, and sometimes they catch on outside of an academic context too, and a new language is built around the new idea.\n\nLanguages have trade-offs. One well-suited for one purpose may be poorly-suited for other purposes.", "upvote_ratio": 170.0, "sub": "AskProgramming"}727{"thread_id": "unp4h2", "question": "Why are there multiple programming languages?", "comment": "Because anyone can write a language.\n\nEveryone is smarter than the last person so theirs is the best way.\n\nWould it be better if there were only one? And one OS, and one model of car?", "upvote_ratio": 100.0, "sub": "AskProgramming"}728{"thread_id": "unp4h2", "question": "Why are there multiple programming languages?", "comment": "Why are there multiple flavors of food?\n\nWhy are there different colors of paint?\n\nWhy are there different kitchen utensils?\n\nWhy are there different tools?\n\nWhy are there different sports?", "upvote_ratio": 100.0, "sub": "AskProgramming"}729{"thread_id": "unpguo", "question": "I only made a `bidirectional iterator` once before and that was for a `list` a long time ago. So I am uncertain how to do it for a `map` now concerning the `member typedefs` of `std::iterator_traits<It>`. If I am doing `template <tyename K, typename v>` where K is the `key` and V is the `value`, then would this ok for the `member typedefs`?:\n\n    template <typename K, typename V>\n    struct Iterator {\n      using value_type = V;\n      using difference_type = ptrdiff_t;\n      using pointer = V*;\n      using reference = V&;\n      using iterator_category = std::bidirectional_iterator_tag;\n    };  \n\nThanks", "comment": "`value_type` for associative containers is generally `pair<const Key, Value>`, with everything else following from that.\n\n//edit: In case your map type does not store its nodes in a pair, you could consider something like `pair<const Key&, Value&>`.", "upvote_ratio": 30.0, "sub": "cpp_questions"}730{"thread_id": "unppsp", "question": "Satellites can sit in orbit. Can missiles do the same?", "comment": "[Yes.](https://en.wikipedia.org/wiki/Fractional_Orbital_Bombardment_System)", "upvote_ratio": 240.0, "sub": "AskScience"}731{"thread_id": "unppsp", "question": "Satellites can sit in orbit. Can missiles do the same?", "comment": "It's called Fractional Orbital Bombardment system. It does require a missile designed for it. The delta V (change in velocity) requirement is higher than for an ICBM, so it needs either a more powerful missile or/and a lighter warhead, and the missile needs to perform the reentry burn meaning there's different control requirements after the boost phase.\n\nEdit: Or just orbital bombardment if the missile loiters in orbit for ages. Doing that with nuclear warheads would break international treaties.", "upvote_ratio": 50.0, "sub": "AskScience"}732{"thread_id": "unppsp", "question": "Satellites can sit in orbit. Can missiles do the same?", "comment": "[removed]", "upvote_ratio": 40.0, "sub": "AskScience"}733{"thread_id": "unpriy", "question": "For me, I think you can get better Italian food than in Italy in some places in the US. What are some foods like this for y\u2019all?", "comment": "I\u2019m gonna throw a weird one out there, but bagels.", "upvote_ratio": 6050.0, "sub": "AskAnAmerican"}734{"thread_id": "unpriy", "question": "For me, I think you can get better Italian food than in Italy in some places in the US. What are some foods like this for y\u2019all?", "comment": "May be an unpopular opinion but I prefer American pizza over Italian pizza\u2026 and I don\u2019t mean that chain restaurant pizza, but those from small businesses. I remember eating this delicious cheese pizza from NYC on my trip last year and it  was better than any pizza I tried at Italy when I went on summer trip there 3 years ago\u2026 and believe me, I tried a good amount of places. May just be my taste buds tho\u2026.", "upvote_ratio": 5620.0, "sub": "AskAnAmerican"}735{"thread_id": "unpriy", "question": "For me, I think you can get better Italian food than in Italy in some places in the US. What are some foods like this for y\u2019all?", "comment": "Sorry Germany. America took your burger, ran with it, and got all the gold medals.", "upvote_ratio": 3770.0, "sub": "AskAnAmerican"}736{"thread_id": "unq2ic", "question": "And when I mean modern, I mean the last 10-15 years. What old techology do you really miss?", "comment": "i dont covet old technology but i do think social media has ruined humanity.", "upvote_ratio": 390.0, "sub": "AskOldPeople"}737{"thread_id": "unq2ic", "question": "And when I mean modern, I mean the last 10-15 years. What old techology do you really miss?", "comment": "I've become a luddite of sort as well.  I don't know if I am quite old enough to comment yet (40, b. 1981) but I miss technology from 15 years ago.   Algorithms have ruined social media. All these places used to have NO ADS. You OWNED your software and no one could force you to update anything.  I read somewhere on reddit that taking tests in school requires eye tracking software and I think I'd rather be temporarily blind than submit to that.  \n\n\n\nA pesky example: My Samsung just \"updated\" recently and tore out a function that I used a LOT, the health heartbeat and O2 meter, and the only option now is to get a 3rd party app that has invasive ads or pay even more money for the same thing I already had.  I'm going to be salty and cantankerous about it for a while too, so I am feeling like an old curmudgeon.", "upvote_ratio": 200.0, "sub": "AskOldPeople"}738{"thread_id": "unq2ic", "question": "And when I mean modern, I mean the last 10-15 years. What old techology do you really miss?", "comment": "I\u2019m the 51 year old tech support manager for an office of lawyers ranging in age from late 20s to early 70s. In my experience, no one hates any and all technology like a 35 year old lawyer. I send them instructions on how to change their default browser and they react like I told them they have to compile their own source code.           \n     \nFor myself, I\u2019ve always been a techie guy, but I don\u2019t like a lot of the ways that\u2019s technology is progressing. \nI don\u2019t like when things are hidden from me in the interest of making them easier to use.         \nI don\u2019t like how everything wants to tie me down to monthly fees. I pay monthly for Adobe Photoshop and Lightroom, which means that as soon as I stop paying, my photo libraries become useless. I subscribe to Apple Music, which is super convenient, but as soon as I stop paying I no longer have any music. If I were to \u201cbuy\u201d a movie from the Google Play store, do I really own it? What if they scrap the store like they did with Google Music?               \nI don\u2019t like the massive harvesting of personal information.          \nI don\u2019t like ads everywhere. Instagram is now showing a \u201cpersonalized\u201d ad for every 3 pictures.          \n\nI miss buying something like an new CD player or vhs player, buying some tapes or CDs, and just playing them. If the thing breaks, I can get it fixed and use it until the tapes wear out.        \nNo license agreements, no giving them my email address or phone number, not having to opt out of sending usage statistics to \u201cimprove my experience\u201d. Just leave me alone.", "upvote_ratio": 120.0, "sub": "AskOldPeople"}739{"thread_id": "unqo55", "question": "Can decompression sickness cause pneumocephalus (air in the cranial cavity)?", "comment": "I don\u2019t think so:\n\n* decompression sickness (DCS) doesn\u2019t cause \\*air\\* anywhere, only nitrogen\n* nitrogen equilibrates between environment, lungs and blood relatively slowly (compared to oxygen and CO2): DCS is caused by an imbalance between higher tissue concentrations and lower ambient (partial) pressures - nitrogen bubbles then form, best pictured by all the bubbles appearing in fizzy drink when opened. \n* these bubbles will form where tissue nitrogen concentrations are highest. This can be in general tissues, but is usually within plasma, liver and muscle. They therefore form within the blood vessels rather than as free gas within the brain or CSF.  Although the latter is possible I think neurological DCS is still a manifestation of circulatory dysfunction secondary to bubble formation, not direct formation of bubbles in neurological tissue. \n\nThis is Reddit so I could be wrong, but the basics will be sound so the answer is likely to be \u2018no\u2019", "upvote_ratio": 30.0, "sub": "AskScience"}740{"thread_id": "unqui2", "question": " Hello! Logins will be held in a SQL database. We want to limit access to 5 devices simultaneously. If a user will connect from a 6th device and if our app/client is working on all 5 devices, he won't log in.", "comment": "This works for 5 browsers not 5 devices. \n\nStore a generated ID in a cookie and send it with each request, keep an array of the ID associated with the user in the database. Limit the IDs to 5 in the DB. If a request comes from the user and the ID passed with the request isn't in the database IDs, reject the request.", "upvote_ratio": 50.0, "sub": "AskProgramming"}741{"thread_id": "unr0ga", "question": " I mean we do have Lady liberty, and uncle sam. Columbia too, along with the obsolete and dated personifications. Like brother Jonathan. But if we were to really capture the USA under one person, who or what would it be?", "comment": "Lady Liberty isn't a personification. It's a symbol for what we strive to be\n\n[It's why China will never see Spiderman: No Way Home](https://screenrant.com/spiderman-no-way-home-finale-china-edit-request/)", "upvote_ratio": 420.0, "sub": "AskAnAmerican"}742{"thread_id": "unr0ga", "question": " I mean we do have Lady liberty, and uncle sam. Columbia too, along with the obsolete and dated personifications. Like brother Jonathan. But if we were to really capture the USA under one person, who or what would it be?", "comment": "Hey now, let's put some respect on Miss Columbia's name why don't we\n\nShe was a girlboss throughout the 1800s/early 1900s until she was unfairly killed off by the world wars and the \"need\" for a masculine personification\n\nIn political comics, she was always a better personification  (as was shown to care more about justice/equality/democracy) than Uncle Sam. She was used to represent the American people while Uncle Sam was used to represent the federal government.\n\nEidt\n\nOf course, the answer to this question can be answered by Hetalia", "upvote_ratio": 200.0, "sub": "AskAnAmerican"}743{"thread_id": "unr0ga", "question": " I mean we do have Lady liberty, and uncle sam. Columbia too, along with the obsolete and dated personifications. Like brother Jonathan. But if we were to really capture the USA under one person, who or what would it be?", "comment": "Trying to capture it as one person would be a disservice to the nation itself.", "upvote_ratio": 130.0, "sub": "AskAnAmerican"}744{"thread_id": "unrc4v", "question": "(Sorry I know this is a cpp subreddit but c seems to be inactive)\n\nThe following is intended to print out statements but in different lines:\n\n    #include <stdio.h>\n    \n    int main(){\n        printf(\"Hello World!\");\n        printf(\" \");\n        \n        int number= 1;\n        float percentage= 3.14;\n        char letter = 'A';\n        \n        printf(\"This is the number: %d\", number);\n        printf(\"This is the percentage: %f\", percentage);\n        printf(\"This is the character: %c\", letter);\n        \n        return 0;\n    }\n\nHowever, it all prints on the same line.\n\nOutput:\n\n    Hello World! This is the number: 1This is the percentage: 3.140000This is the character: A\n\nI also tried doing it so that it prints the percentage sign on line 12:\n\n    printf(\"This is the percentage: %f%\", percentage);\n\nbut I got an error, what can I do?\n\nI am coding on Ubuntuu text editor, using terminal to run my code, and an online compiler. Both print on the same line.", "comment": "printf doesn't automatically add a newline. u need to add `\\n`, ie `printf(\"hello\\n\")`.\n\nfor the percent sign you probably need to escape it since it is a special character. Try `printf(\"This is the percentage: %f\\%\", percentage);`", "upvote_ratio": 70.0, "sub": "cpp_questions"}745{"thread_id": "uns7h7", "question": "Like if I wanted to stand at the highest and lowest point where would I need to go?", "comment": "Highest: Mount Whitney\n\nLowest: Death Valley\n\nApparently these are also the highest and lowest points in the contiguous United States.", "upvote_ratio": 350.0, "sub": "AskAnAmerican"}746{"thread_id": "uns7h7", "question": "Like if I wanted to stand at the highest and lowest point where would I need to go?", "comment": "Tallest: Mt Elbert - 14,439 ft. \n\nLowest: Lauren Boebert\u2019s district.", "upvote_ratio": 160.0, "sub": "AskAnAmerican"}747{"thread_id": "uns7h7", "question": "Like if I wanted to stand at the highest and lowest point where would I need to go?", "comment": "[https://en.wikipedia.org/wiki/Britton\\_Hill](https://en.wikipedia.org/wiki/Britton_Hill)  comes in at a whooping 345 feet summit. Pretty much everywhere else is coast line.", "upvote_ratio": 140.0, "sub": "AskAnAmerican"}748{"thread_id": "unsbpq", "question": "Is isolationist sentiment on the rise? Do you think it will continue to grow?", "comment": "Yes, on both sides of the political spectrum but for different reasons.\n\nRepublicans are saying other countries have taken advantage of the USA, that they're not paying their fair share to our commitments, and we shouldn't be spending money on foreign aid that could be going to Americans here. \n\nDemocrats are saying we shouldn't be intervening in other countries affairs, that we have a history of destabilizing and overthrowing governments that don't follow our orders, and that we shouldn't be telling other nations how to live when we have a myriad of issues at home we should be focusing on. \n\nBoth sides essentially want isolationism, their reasoning for it differs a little though. But what will ultimately win out in politics is business interests and business interests benefit more from our global position than they would an isolationist one", "upvote_ratio": 640.0, "sub": "AskAnAmerican"}749{"thread_id": "unsbpq", "question": "Is isolationist sentiment on the rise? Do you think it will continue to grow?", "comment": "Nice try Vladimir", "upvote_ratio": 420.0, "sub": "AskAnAmerican"}750{"thread_id": "unsbpq", "question": "Is isolationist sentiment on the rise? Do you think it will continue to grow?", "comment": "I think we should help Ukraine, but if you compare the numbers Europe isn't stepping up and doing their fair share. As usual.", "upvote_ratio": 400.0, "sub": "AskAnAmerican"}751{"thread_id": "unsdlz", "question": "Evidently there is sulfur and oxygen in magma and it combines to form SO2. What magma chemistry leads to this being a primary constituent of volcanic eruptions?", "comment": "You answered your question pretty well in asking it:\n\nIt's a major volcanic emission because sulfur is in solution in magma. There's a fair amount in the earth in general, and it ends up in most magma in some amount, just like silicon, iron, aluminum, calcium, and sodium.\n\nWhen the magma cools, near the surface in the case of a volcano, the sulfur is one of the last things in the liquid magma to be in an 'active' state (I think it's technically a superfluid under these conditions, but it might just be a gas dissolved in mostly solid rock?).\n\nThis sulfur escapes through micro- or macroscopic cracks (or the bubbling surface of a lava lake or flow, or mixed with ash and CO2 and water in an explosive eruption) and reacts with air to form sulfur dioxide.", "upvote_ratio": 50.0, "sub": "AskScience"}752{"thread_id": "unsdz4", "question": "Would the blood be \u2018tainted\u2019? Could it potentially get someone sick? Asking out of curiosity all I could find online is \u201cdon\u2019t donate until one week free of symptoms\u201d.", "comment": "First up, respiratory viruses are not known to be transmitted through blood transfusions.  This was confirmed many times during Covid-19.  Respiratory viruses mostly live in cells in your airways, they aren't in your blood stream.\n\nEven then, not a problem for the recipient (mostly) due to how donated blood is processed.\n\nLet's specifically look at *whole blood* donation in wealthy countries.\n\nYour individual donation is often these days mixed in with a lot of other people before any testing.    It all depends on the centre that does the collection and company that does the processing.  But let's assume individual testing.\n\nIt is tested for blood groups, red cell antibodies and then a handful of blood borne infectious diseases such as HIV, hepatitis, syphilis, HTLV, CMV and malaria if you checked that box.  Others too depending on where you live.\n\nWorth mentioning that even those are removed in later processes by washing.  More on that below.\n\nYour blood is then broken down into it's components using a centrifuge.  Red blood cells, plasma, or platelets are extracted using specialised machines.  There are also special detergents and soaps to remove viruses or proteins that are not wanted.  This is called [blood washing](https://en.wikipedia.org/wiki/Washed_red_blood_cells).  It's rare these days to get given a packet of blood that was taken directly from the host without processing.\n\nAny cold viruses will be removed by washing.  They aren't there, but if they were somehow, they are removed.\n\nFrom [the WHO website](https://www.who.int/news-room/fact-sheets/detail/blood-safety-and-availability): 37% of the blood collected in low-income countries is separated into components, 69% in lower-middle-income countries, 95% in upper-middle-income countries, and 97% in high-income countries.\n\nYour two main concerns not addressed above are \n\n* Allergic reactions to proteins and/or cells in the transfusion (not related to colds)\n\n* Fever due to special proteins called *cytokines* in the transfusion. These reactions are called febrile nonhemolytic transfusion reactions (FNHTRs) (related to colds)\n\nCytokines are special proteins you make to trigger your immune system.  You can think of it as you get a respiratory virus, your body then sounds the alarm (cytokines) to make an immune response.  After a transfusion the host body is confused at why the alarm is sounding so it starts an immune response just in case.  Important note: the host doesn't have an infection, their body is responding as if it has.\n\nPartly, we don't need a patient starting an immune response when they already under stress for whatever reason they need the blood.  However, the trauma requiring a blood transfusion is probably so serious that a fever is least of their problems.\n\nMostly, *we want you to wait for your own health*.  After a cold your body is stressed and we don't want to cause you harm too.  Your blood volume is higher in white blood cells, but not a problem as all those white blood cells will be removed and thrown away / turned into products.\n\nFun fact: the preferred process to dispose of waste human blood is to pour down the regular domestic sewer drain for disposal.  This is completely legal and safe.  Should a blood processer decide a batch is (1) too old and unusable or (2) contaminated in some way that it is too expensive to purify or (3) too much was collected, they will pour it down the drain.", "upvote_ratio": 80.0, "sub": "AskScience"}753{"thread_id": "unsdz4", "question": "Would the blood be \u2018tainted\u2019? Could it potentially get someone sick? Asking out of curiosity all I could find online is \u201cdon\u2019t donate until one week free of symptoms\u201d.", "comment": "It's actually....really, really bad if a cold virus gets from your nose/throat/lungs to your blood. Sometimes your digestive tract gets infected, too, but a typical cold infection would leave various *markers* of the infection, from white blood cells etc going to the linings of your airways and other immune processes on-site, but hypothetically no living cold virus.\n\nThe rules are to be careful in the 0.1% (or some other very small percent) of cases where that isn't the case, and someone vulnerable gets REALLY sick.\n\nEDIT: thought about this some more. I think there may be active virus in your blood with a 'normal' cold, but not at concentrations where it can successfully start infecting more of your cells elsewhere in your body. One problem they hope to avoid is that your blood might go to someone with next to no working immune system who could get a systemic infection from a tiny viral load in donated blood. I think. Folks who aren't the nerd kid of two nerd nurses feel free to weigh in.", "upvote_ratio": 50.0, "sub": "AskScience"}754{"thread_id": "unspbx", "question": "I've got the following function, which uses `std::make_unique`:\n\n    void from_json(const nl::json& json, std::unique_ptr<b2Shape>& shape)\n    {\n        const int type{json.at(\"type\").get<int>()};\n        const nl::json& value = json.at(\"value\");\n    \n        switch (type)\n        {\n        case 0:\n            shape = std::make_unique<b2CircleShape>(value.get<b2CircleShape>());\n            break;\n        \n        case 1:\n            shape = std::make_unique<b2EdgeShape>(value.get<b2EdgeShape>());\n            break;\n    \n        case 2:\n            shape = std::make_unique<b2PolygonShape>(value.get<b2PolygonShape>());\n            break;\n    \n        case 3:\n            shape = std::make_unique<b2ChainShape>(value.get<b2ChainShape>());\n            break;\n    \n        default:\n            throw util::Io_error{\"unknown shape type\"};\n        }\n    }\n\nHow can I make a `void from_json(const nl::json& json, std::shared_ptr<b2Shape>& shape)` version without duplicating code? The signature must be as described so the json library can recognize the function.\n\nOne idea is to just call `new`, but is there a better way?", "comment": "You can construct a shared_ptr by moving from a unique_ptr\n\nSo have the shared from_json call the unique one", "upvote_ratio": 60.0, "sub": "cpp_questions"}755{"thread_id": "untk4o", "question": "I'm trying to do my own clicker game, and I'd like to do a map like Pok\u00e9clicker have, with different single color tiles next to another, with a light grey grid to show the mark between 2 tiles. Any idea how to code that in a proper manner ?   \n\n\nI'm thinking something like this [https://i.redd.it/rr4q4mfrbqe61.png](https://i.redd.it/rr4q4mfrbqe61.png) in the bottom part of the screen, in the middle.  \n\n\nI'm thinking array of arrays with a color each, an printing color\\[0\\] + separator + color\\[1\\] ... for each line, separated by a line of separator or something like that. Sounds kinda basics, so I figured they were better ways to do it.", "comment": "Sounds like you want to implement a two-dimensional array: https://math.hws.edu/javanotes/c7/s5.html", "upvote_ratio": 30.0, "sub": "AskProgramming"}756{"thread_id": "untutd", "question": "In my country same retail chain has different prices for same product in different places which depends on purchasing power of region. Is this a thing in US?", "comment": "Due to different costs in different states, even different municipalities can have different prices.\n\nCalifornia retail prices are higher than retail prices in in Texas, for example. You can check [numbeo.com](https://numbeo.com).\n\nRetail sites also often ask you to enter to your ZIP code.\n\nNominally, chains like Dollar Tree might say that they try to maintain consistent prices, but in reality their prices must vary to keep up with fluctuating costs.", "upvote_ratio": 190.0, "sub": "AskAnAmerican"}757{"thread_id": "untutd", "question": "In my country same retail chain has different prices for same product in different places which depends on purchasing power of region. Is this a thing in US?", "comment": "I believe the Costco food court has the same prices nationwide. other than that, no. Varying cost of living and tax rates make prices fluctuate a lot", "upvote_ratio": 30.0, "sub": "AskAnAmerican"}758{"thread_id": "untutd", "question": "In my country same retail chain has different prices for same product in different places which depends on purchasing power of region. Is this a thing in US?", "comment": "Not really. Sales tax varies though.", "upvote_ratio": 30.0, "sub": "AskAnAmerican"}759{"thread_id": "untx5n", "question": "Do you need a supercomputer to train a neural network?", "comment": "This depends entirely on the size/complexity of the neural network and the data you're working with\n\nA neural network can be anything from single-digit amount of neurons to billions, if not trillions, of neurons such as for example GTP-3\n\nYou can train a relatively simple neural network on your home computer in a reasonable timeframe.", "upvote_ratio": 100.0, "sub": "AskComputerScience"}760{"thread_id": "untx5n", "question": "Do you need a supercomputer to train a neural network?", "comment": "No. \n\nYou might want a bunch of regular computers depending on the size of the net", "upvote_ratio": 40.0, "sub": "AskComputerScience"}761{"thread_id": "unu2s0", "question": "My dentist is mad about the stuff, reckons if I can only do one I should floss rather than brush. Good way to stop teeth decay. But what do First Nations culture use if they don\u2019t have plastic?", "comment": "While dental floss may not have existed many cultures used miswak or need branches that people chew on. They have antimicrobial properties and the ends can be used to dislodge food and brush one's teeth.\n\nI'm sure other cultures had similar technology.", "upvote_ratio": 40.0, "sub": "AskScience"}762{"thread_id": "unuevz", "question": "What are some crazy/weird laws in your state?", "comment": "It's illegal to hunt whales in Oklahoma.\n\nhttps://www.knowledgetribe.in/articles/7-unusual-laws-around-world#:~:text=Oklahoma%20has%20a%20law%20which,stringent%20law%20banning%20the%20pastime.", "upvote_ratio": 130.0, "sub": "AskAnAmerican"}763{"thread_id": "unuevz", "question": "What are some crazy/weird laws in your state?", "comment": "In Colorado it's a fairly significant misdemeanor, with possible penalties of up to a year in jail prior to March 1 (not sure how this offense was reclassified), to throw a cigarette out the window of a car\n\nIt makes sense when you think about the wildfire problems here, but definitely shocking to see how severe it is", "upvote_ratio": 100.0, "sub": "AskAnAmerican"}764{"thread_id": "unuevz", "question": "What are some crazy/weird laws in your state?", "comment": "Restaurants and bars are required to specify which they are. So a restaurant will have a sign stating \"This establishment is a restaurant\" and a bar stating \"This establishment is a bar\" or something like that. Up until a year or so ago we weren't allowed to have the same percentage of ABV in our beer as every other state. I believe the maximum ABV you can purchase outside of a liquor store is 5% now, it was like 3.5% before.", "upvote_ratio": 90.0, "sub": "AskAnAmerican"}765{"thread_id": "ununpf", "question": "One that sticks with me is \"Hold onto yourself, Bartlett.  You're twenty feet short.\"", "comment": "\"Serpentine! Serpentine!\"", "upvote_ratio": 80.0, "sub": "AskOldPeople"}766{"thread_id": "ununpf", "question": "One that sticks with me is \"Hold onto yourself, Bartlett.  You're twenty feet short.\"", "comment": "I love the smell of Napalm in the morning\n\nApocalypse Now", "upvote_ratio": 50.0, "sub": "AskOldPeople"}767{"thread_id": "ununpf", "question": "One that sticks with me is \"Hold onto yourself, Bartlett.  You're twenty feet short.\"", "comment": "'Don't be stoopid.   Nobody's jugs're bigger than their neck. '  *Grease*", "upvote_ratio": 50.0, "sub": "AskOldPeople"}768{"thread_id": "unv7pf", "question": "I am from india and casual sex is not very common here.And i always hear a lot about america that casual sex and kink parties are common.Can anyone give some idea?\n\nBy casual sex,i mean people involving physically with other people if they are mutually attracted to each other without committing to one long term partner.", "comment": "casual sex between two people? very common, mostly through dating apps/college scenes etc.   \n\n\nsex parties/orgies? not very common.", "upvote_ratio": 1750.0, "sub": "AskAnAmerican"}769{"thread_id": "unv7pf", "question": "I am from india and casual sex is not very common here.And i always hear a lot about america that casual sex and kink parties are common.Can anyone give some idea?\n\nBy casual sex,i mean people involving physically with other people if they are mutually attracted to each other without committing to one long term partner.", "comment": "I used to spend a lot of time in India and I was always surprised at how much sex you guys think goes on here. Like, I used to check into hotels with my wife and they would assume that we were casual friends who were sleeping together (They would say things like, \"So, I assume a one-bed room for you and your... Friend?\"). We were wearing wedding bands and everything, although I guess culturally that's not always how you guys represent marriage over there huh? \n\nAnyway, I used to get the distinct impression that a lot of people in India think that way about America because of our TV shows. Sit-coms like Friends and stuff. There is definitely more causal sex in America than in India, but certainly not as much as those TV shows make it seem. Kind of like how a bunch of Indian soap operas make it look like everyone has a ton of money and lives in really nice houses, and wears a ton of gold jewelry everyday? Similar in America.", "upvote_ratio": 970.0, "sub": "AskAnAmerican"}770{"thread_id": "unv7pf", "question": "I am from india and casual sex is not very common here.And i always hear a lot about america that casual sex and kink parties are common.Can anyone give some idea?\n\nBy casual sex,i mean people involving physically with other people if they are mutually attracted to each other without committing to one long term partner.", "comment": "> casual sex  \n>  \n>kink parties\n\nThese two are not as connected as you'd like to think. \n\nIts interesting one side of the world thinks we're these sex crazed maniacs and the other side of the world thinks we're stuck up prudes.", "upvote_ratio": 700.0, "sub": "AskAnAmerican"}771{"thread_id": "unv8bo", "question": "So I made a little program to calculate marks for test. It's my first project so I may have done something wrong.\n\nHere's the code:\n\n        #include <iostream>\n        #include <fstream>\n        #include <cmath>\n        using namespace std;\n    \n        struct {\n            string fach;\n            float maxP;\n            float yourP;\n            float note;\n        }note;\n        string mid = \" \";\n        string line = \" \";\n        string notes = \" \";\n        bool s;\n    \n        string getNot(string str1, int num1){\n            string note = \" \";\n            int pos1 = 0;\n            for(int i=num1; i <= str1.length(); i++){\n                    note[0]=str1[i];\n            }\n            return note;\n        }\n    \n        int main(){\n            ofstream file(\"data.txt\", std::ios_base::app);\n            cout << \"Deine Punktzahl:\" << endl;\n            cin >> note.yourP;\n            cout << \"Max. Punktzahl:\" << endl;\n            cin >> note.maxP;\n            note.note = ceil(((note.yourP/note.maxP)*5+1) * 100.0) / 100.0;\n            if(note.note >7){\n                cout << \"FALSCHE PUNKTZAHL\" << endl;\n                return 0;\n            }else if(note.note < 7 && note.note > 6){\n                note.note = 6;\n            }\n            cout << \"Fach:\" << endl;\n            cout << \"SH - Software Hardware\";\n            cout << \"   M - Mathe\" ;\n            cout << \"   P - Physik\" << endl;\n            cout << \"I - Informatik\" ;\n            cout << \"   EK - Elektronik\";\n            cout << \"   ET - Elektrotechnik\" << endl;\n            cin >> note.fach;\n            cout << note.note <<endl;\n            cout << \"Save?\" << endl;\n            cin >> s;\n            if(s){\n                file<<\"f:\"<< note.fach <<\"|yP\"<< note.yourP <<\"|mP \"<< note.maxP <<\"|nt \"<< note.note << endl;\n            }\n            file.close();\n            ifstream fileR;\n            fileR.open(\"data.txt\");\n            if(!fileR){\n                cout << \"Unable to open file\" << endl;\n                exit(1);\n            }\n            cout << \"Welche Noten?\" << endl;\n            cin >> mid;\n            if(mid != \".\"){\n                size_t pos;\n                while(fileR.good()){\n                    getline(fileR,line); // get line from file\n                    pos=line.find(mid); // search\n                    if(pos!=string::npos){\n                            pos=line.find(\"nt\")+3;\n                            break;\n                    }\n                }\n                notes = getNot(line, pos);\n                cout << notes << endl;\n            }\n            return 0;\n        }\n\nThe problem is that the `getNot(line, pos);` doesn't return the string. I have checked and in the function itself it does write to `note`, but it doesn't return the `note` string. Have I missed something?\n\nEDIT: I havent even noticed that I left the 0 in `note[0]`, now I see it will only return one character. Thanks for helping me spot the problem", "comment": "You can return strings, exactly like that. Your problem is somewhere else.\n\n1. `struct {...} note;` is a terrible idea. Unnamed types are very rarely useful.\n2. Don't use `using namespace std;`\n3. Don't use (mutable) global variables\n4. `for(int i=num1; i <= str1.length(); i++)` is going out of bounds for `str1[i]`.\n5. `note[0]=str1[i];` Are you sure you want to overwrite the first char over and over?\n6. Why are you using floats? You're using double literals for the calculations anyway so even if you had a reason to use floats (and you don't) it would be screwed up at that point.\n7. You need to `#include <string>` if you use `std::string` and `std::getline`.\n8. Why do you hate whitespace that much? Code is way more readable if you put spaces around operators.\n9. Why are you writing things to file just to read them again? Just use the data directly and then write to the file at the end if you have to save it.", "upvote_ratio": 120.0, "sub": "cpp_questions"}772{"thread_id": "unv8bo", "question": "So I made a little program to calculate marks for test. It's my first project so I may have done something wrong.\n\nHere's the code:\n\n        #include <iostream>\n        #include <fstream>\n        #include <cmath>\n        using namespace std;\n    \n        struct {\n            string fach;\n            float maxP;\n            float yourP;\n            float note;\n        }note;\n        string mid = \" \";\n        string line = \" \";\n        string notes = \" \";\n        bool s;\n    \n        string getNot(string str1, int num1){\n            string note = \" \";\n            int pos1 = 0;\n            for(int i=num1; i <= str1.length(); i++){\n                    note[0]=str1[i];\n            }\n            return note;\n        }\n    \n        int main(){\n            ofstream file(\"data.txt\", std::ios_base::app);\n            cout << \"Deine Punktzahl:\" << endl;\n            cin >> note.yourP;\n            cout << \"Max. Punktzahl:\" << endl;\n            cin >> note.maxP;\n            note.note = ceil(((note.yourP/note.maxP)*5+1) * 100.0) / 100.0;\n            if(note.note >7){\n                cout << \"FALSCHE PUNKTZAHL\" << endl;\n                return 0;\n            }else if(note.note < 7 && note.note > 6){\n                note.note = 6;\n            }\n            cout << \"Fach:\" << endl;\n            cout << \"SH - Software Hardware\";\n            cout << \"   M - Mathe\" ;\n            cout << \"   P - Physik\" << endl;\n            cout << \"I - Informatik\" ;\n            cout << \"   EK - Elektronik\";\n            cout << \"   ET - Elektrotechnik\" << endl;\n            cin >> note.fach;\n            cout << note.note <<endl;\n            cout << \"Save?\" << endl;\n            cin >> s;\n            if(s){\n                file<<\"f:\"<< note.fach <<\"|yP\"<< note.yourP <<\"|mP \"<< note.maxP <<\"|nt \"<< note.note << endl;\n            }\n            file.close();\n            ifstream fileR;\n            fileR.open(\"data.txt\");\n            if(!fileR){\n                cout << \"Unable to open file\" << endl;\n                exit(1);\n            }\n            cout << \"Welche Noten?\" << endl;\n            cin >> mid;\n            if(mid != \".\"){\n                size_t pos;\n                while(fileR.good()){\n                    getline(fileR,line); // get line from file\n                    pos=line.find(mid); // search\n                    if(pos!=string::npos){\n                            pos=line.find(\"nt\")+3;\n                            break;\n                    }\n                }\n                notes = getNot(line, pos);\n                cout << notes << endl;\n            }\n            return 0;\n        }\n\nThe problem is that the `getNot(line, pos);` doesn't return the string. I have checked and in the function itself it does write to `note`, but it doesn't return the `note` string. Have I missed something?\n\nEDIT: I havent even noticed that I left the 0 in `note[0]`, now I see it will only return one character. Thanks for helping me spot the problem", "comment": "##include <string>", "upvote_ratio": 50.0, "sub": "cpp_questions"}773{"thread_id": "unv8bo", "question": "So I made a little program to calculate marks for test. It's my first project so I may have done something wrong.\n\nHere's the code:\n\n        #include <iostream>\n        #include <fstream>\n        #include <cmath>\n        using namespace std;\n    \n        struct {\n            string fach;\n            float maxP;\n            float yourP;\n            float note;\n        }note;\n        string mid = \" \";\n        string line = \" \";\n        string notes = \" \";\n        bool s;\n    \n        string getNot(string str1, int num1){\n            string note = \" \";\n            int pos1 = 0;\n            for(int i=num1; i <= str1.length(); i++){\n                    note[0]=str1[i];\n            }\n            return note;\n        }\n    \n        int main(){\n            ofstream file(\"data.txt\", std::ios_base::app);\n            cout << \"Deine Punktzahl:\" << endl;\n            cin >> note.yourP;\n            cout << \"Max. Punktzahl:\" << endl;\n            cin >> note.maxP;\n            note.note = ceil(((note.yourP/note.maxP)*5+1) * 100.0) / 100.0;\n            if(note.note >7){\n                cout << \"FALSCHE PUNKTZAHL\" << endl;\n                return 0;\n            }else if(note.note < 7 && note.note > 6){\n                note.note = 6;\n            }\n            cout << \"Fach:\" << endl;\n            cout << \"SH - Software Hardware\";\n            cout << \"   M - Mathe\" ;\n            cout << \"   P - Physik\" << endl;\n            cout << \"I - Informatik\" ;\n            cout << \"   EK - Elektronik\";\n            cout << \"   ET - Elektrotechnik\" << endl;\n            cin >> note.fach;\n            cout << note.note <<endl;\n            cout << \"Save?\" << endl;\n            cin >> s;\n            if(s){\n                file<<\"f:\"<< note.fach <<\"|yP\"<< note.yourP <<\"|mP \"<< note.maxP <<\"|nt \"<< note.note << endl;\n            }\n            file.close();\n            ifstream fileR;\n            fileR.open(\"data.txt\");\n            if(!fileR){\n                cout << \"Unable to open file\" << endl;\n                exit(1);\n            }\n            cout << \"Welche Noten?\" << endl;\n            cin >> mid;\n            if(mid != \".\"){\n                size_t pos;\n                while(fileR.good()){\n                    getline(fileR,line); // get line from file\n                    pos=line.find(mid); // search\n                    if(pos!=string::npos){\n                            pos=line.find(\"nt\")+3;\n                            break;\n                    }\n                }\n                notes = getNot(line, pos);\n                cout << notes << endl;\n            }\n            return 0;\n        }\n\nThe problem is that the `getNot(line, pos);` doesn't return the string. I have checked and in the function itself it does write to `note`, but it doesn't return the `note` string. Have I missed something?\n\nEDIT: I havent even noticed that I left the 0 in `note[0]`, now I see it will only return one character. Thanks for helping me spot the problem", "comment": "The function certainly returns a string. But the question is what string? What do you want the function to do? I don't think it does what you want: currently it returns a string which consists of a single character which is the last character of the input argument `str1` unless `num1` is equal to or larger than the length of `str1` in which case it just returns a string with a space: \" \". Also the variable `pos1` is completely unused. I don't know what the function is supposed to do, so I can't really help you more than that.\n\nHere are some other suggestions for improving your code in general:\n\nYou are using old C-style declarations of structs - don't do that, do:\n\n    struct note {\n        string fach;\n        float maxP;\n        float yourP;\n        float note;\n    };\n\n(notice position of name `node` should immediately follow `struct`)\n\nDon't use global variables (except for global constants)! Just don't! This is a bad practice that will quickly lead to errors. Instead declare and define them in the scope/function where they are needed - in your case you can move the definition of  `mid`, `line`, `notes` and `s` into the `main` function.\n\nUse (long) descriptive variable names. In three hours you have already forgotten what `mid`, `s`, `num1` and `pos1` refer to. Use *descriptive*  names: `do_save`, `start_index` etc.\n\nEnable all (or almost all) warnings for your compiler. If you're using Visual Studio you can use `/Wall` or `/W4`, on gcc/clang you can use `-Wall -Wpedantic -Wextra`\n\nEnsure that you use an IDE (like Visual Studio or CLion) or a Text Editor that can show code hints, auto-completion and compiler warnings.", "upvote_ratio": 40.0, "sub": "cpp_questions"}774{"thread_id": "unvbom", "question": "Hi!, I recently bought a 7tb hdd and replaced a 1tb one in my pc, along with replacing an 220gb system ssd for a bigger one (500gb). I've noticed that after that upgrade, file explorer freezes 50% of the time, working in Blender (software), is much slower, and overall the pc is seeming to struggle. How much does disk space influence the stats of the pc? \n\nIs there any easy solution?", "comment": "Try r/techsupport. As the [posting guidelines](https://old.reddit.com/r/AskComputerScience/comments/bl37qz/read_before_posting/) suggest, this sub is rather for questions about [computer science](https://en.wikipedia.org/wiki/Computer_science).\n\nAnyway, to answer the more general question, increased disk space shouldn't slow anything down.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}775{"thread_id": "unvdzr", "question": "Why not just use plates?", "comment": "There\u2019s a sheet of wax paper in it. Easy to toss and clean the basket without wasting a whole plate", "upvote_ratio": 420.0, "sub": "AskAnAmerican"}776{"thread_id": "unvdzr", "question": "Why not just use plates?", "comment": "Food safety laws are different in every state, but in mine (California) and I assume in many others, the major benefit is cleaning time. Baskets do need to be washed/disinfected, but considering there's rarely any actual food on them once the liner is thrown out, doing so is very fast and easy. They also stack easily, are less prone to breaking, and cheaply replaceable, theres also time saved on the serving end of things, if you have waiters who clean the tables, its much faster to dump a basket out than it is to scrape a plate off, or if you rely on customers to return their baskets on their own, you save time having front of house staff put away dishes, and they can focus on cleaning tables/seats instead. \n\nThe restaurant I work at personally serves items like burgers, chicken strips, and fries in baskets, while most of the rest of the menu is served on plates and bowls. I also happen to be the dishwasher during closing shifts, we run a dish-pit with no machine, which means every item is hand rinsed, soaked, and sanitized by yours truly. the difference in time that it takes me to wash 50 baskets vs 50 plates is immense.", "upvote_ratio": 150.0, "sub": "AskAnAmerican"}777{"thread_id": "unvdzr", "question": "Why not just use plates?", "comment": "To be clear, fast food (McDonald\u2019s, Burger King, Wendy\u2019s, etc) doesn\u2019t have baskets, at least any I\u2019ve ever seen. Places like food stands and diners do. So your question is moot.", "upvote_ratio": 60.0, "sub": "AskAnAmerican"}778{"thread_id": "unwbsj", "question": "Are there any free tools and resources to practice with Oracle Cloud Applications? I have seen an internal job opportunity for \u201c Oracle Cloud Applications Administrator\u201d and was thinking about going for it. Anyone have any experience in a similar position and can provide some insight on what the position does?", "comment": "Here you go:\n\n* https://education.oracle.com/learning-explorer\n* https://www.oracle.com/education/\n* https://education.oracle.com/oracle-certification-paths-all\n\nOracle was giving away free training and exam vouchers for months earlier this year so you might want to keep an eye out to see if they offer more this year.", "upvote_ratio": 30.0, "sub": "ITCareerQuestions"}779{"thread_id": "unwk5i", "question": "As the title says.\n\nI'm a 25-year old Filipino expat in UAE currently working as a call center rep and I am considering switching to IT field. I do not have a related degree nor work experience in this field but as I did my research online, I can get certifications and start with the basics such as A+ and work my way up from there which is what I wanted to do. However, I did my research here in UAE and it appears that only a few training centers offer the A+ certification, training takes roughly 4 to 6 weeks before taking the certification exam. \n\nI wanted to ask you all if this timeframe will be enough to cover the entire course or should I consider self-studying to give myself more time to prepare and then do an online certification exam? Also, what are my odds of passing the certification exam if I self-study? \n\nYour thoughts and opinions will be helpful. Thank you.", "comment": "Jason Dion  and Prof Messer Practice tests along with Messer's study groups/videos and ExamCram is what I used for the A+. I'd suggest self study. 4-6 weeks is very rushed. If you practice a lot you'll be fine.", "upvote_ratio": 30.0, "sub": "ITCareerQuestions"}780{"thread_id": "unwq4z", "question": "I like Java, C++ and Javascript. However if there's one language that gives me the heebie jeebies........it's Bash \ud83d\ude10 It's so weird. The fact that spaces are important in syntax and how easy it is to overlook an error because of just a space!? And the code itself looks like it was written by an alien.", "comment": "Like Bash, Perl is a bit of a syntax bastard", "upvote_ratio": 150.0, "sub": "AskProgramming"}781{"thread_id": "unwq4z", "question": "I like Java, C++ and Javascript. However if there's one language that gives me the heebie jeebies........it's Bash \ud83d\ude10 It's so weird. The fact that spaces are important in syntax and how easy it is to overlook an error because of just a space!? And the code itself looks like it was written by an alien.", "comment": "100% Javascript!", "upvote_ratio": 130.0, "sub": "AskProgramming"}782{"thread_id": "unwq4z", "question": "I like Java, C++ and Javascript. However if there's one language that gives me the heebie jeebies........it's Bash \ud83d\ude10 It's so weird. The fact that spaces are important in syntax and how easy it is to overlook an error because of just a space!? And the code itself looks like it was written by an alien.", "comment": "Well OP, just wait for the fun you\u2019ll have with whitespace when you use YAML \ud83d\ude02\n\nI guess PHP and people still using JSP or whatever that ancient Java thing was gives me heebies jeebies, but I generally avoid these things \ud83d\ude1b", "upvote_ratio": 90.0, "sub": "AskProgramming"}783{"thread_id": "unxgdl", "question": "Our project is compiling with C++17 at the moment and we consider moving up to C++20.  \nWe compile to Windows only at the moment, but the issue is that it is very likely that we will have to port it to MacOS and Linux in the future (let's say it for sure won't happen in the next 6 months)\n\nI know that gcc and clang are lagging behind MSVC when it comes to C++20 support, but assuming we stay away from modules at the moment, anyone has an idea of how likely are we to encounter incompatibilities between MSVC/gcc/clang? (i.e code that compiles in one compiler but fails to compile in another due to a bug or a feature that is not yet fully supported)", "comment": "https://en.cppreference.com/w/cpp/compiler_support/20\n\nSo basically modules and std::format are not portable right now, have fun with the rest.", "upvote_ratio": 50.0, "sub": "cpp_questions"}784{"thread_id": "unxo55", "question": "I know it is more of a QoL thing since you can just achieve it through telling everyone on the team to not use it, but it would be very helpful in a codebase touched by many people.", "comment": "You probably can't within the language. The reason is that `int32_t` is very often just something like `typedef int int32_t;`. Things like [std::is\\_same](https://en.cppreference.com/w/cpp/types/is_same) also [think they're the same type](https://godbolt.org/z/v15fv5Mo1). You probably need some compiler-specific stuff if it's even possible.", "upvote_ratio": 250.0, "sub": "cpp_questions"}785{"thread_id": "unxo55", "question": "I know it is more of a QoL thing since you can just achieve it through telling everyone on the team to not use it, but it would be very helpful in a codebase touched by many people.", "comment": "Id install [git hooks](https://git-scm.com/docs/githooks) to ensure nothing with `int` can be pushed", "upvote_ratio": 240.0, "sub": "cpp_questions"}786{"thread_id": "unxo55", "question": "I know it is more of a QoL thing since you can just achieve it through telling everyone on the team to not use it, but it would be very helpful in a codebase touched by many people.", "comment": "There is no way to do it within the language because the type system does not distinguish between them \u2014 `int32_t` is simply a typedef for (typically) either `int` or `long`, meaning they are exactly the same type.\n\nThat said, there are external tools that can do this for you. I believe there is a clang-tidy rule to enforce this style, for instance. It would be nice to get that as a built-in (optional) compiler warning.", "upvote_ratio": 90.0, "sub": "cpp_questions"}787{"thread_id": "unxqbz", "question": "I've been working as application support/developer for the last 15 years, and now that I've turned 40, I've found that I am no longer able to effectively deal with the random incidents and major outages, that I used to be able to shrug off and deal with when younger.  \n\nI'm worried the crushing stress from trying to get a major production system back online during an outage might be affecting my health in potentially dangerous ways now.  As such, I was wondering what, if any, alternative jobs I could consider moving into, that didn't come with the fortnightly all-day MIM/bridge/customer-yelling/panic attack merry go round?  I'm just looking for ideas at this point :)", "comment": "You could move into project management? You have the tech background and it\u2019s not firefighting.", "upvote_ratio": 700.0, "sub": "ITCareerQuestions"}788{"thread_id": "unxqbz", "question": "I've been working as application support/developer for the last 15 years, and now that I've turned 40, I've found that I am no longer able to effectively deal with the random incidents and major outages, that I used to be able to shrug off and deal with when younger.  \n\nI'm worried the crushing stress from trying to get a major production system back online during an outage might be affecting my health in potentially dangerous ways now.  As such, I was wondering what, if any, alternative jobs I could consider moving into, that didn't come with the fortnightly all-day MIM/bridge/customer-yelling/panic attack merry go round?  I'm just looking for ideas at this point :)", "comment": "Security is an option. Compliance is nice in that aspect, you come in to work, tell everyone how they are doing everything wrong and leave while they stay and fix. \n\nThere are other parts of security that don\u2019t deal with incidents as well. Your previous experience is a big advantage when working security as well.", "upvote_ratio": 520.0, "sub": "ITCareerQuestions"}789{"thread_id": "unxqbz", "question": "I've been working as application support/developer for the last 15 years, and now that I've turned 40, I've found that I am no longer able to effectively deal with the random incidents and major outages, that I used to be able to shrug off and deal with when younger.  \n\nI'm worried the crushing stress from trying to get a major production system back online during an outage might be affecting my health in potentially dangerous ways now.  As such, I was wondering what, if any, alternative jobs I could consider moving into, that didn't come with the fortnightly all-day MIM/bridge/customer-yelling/panic attack merry go round?  I'm just looking for ideas at this point :)", "comment": "Look for a new job as a systems architect.", "upvote_ratio": 420.0, "sub": "ITCareerQuestions"}790{"thread_id": "uny1np", "question": "Hi !\n\nI'm having trouble implementing firebase in an iOS app using cpp... I hope you'll be able to help me ^^'\n\nHere are the three troublesome files :\n\nFirst, the listener interface from firebase :\n\nclass Listener {\n public:\n virtual ~Listener();\n\n /// Called on the client when a message arrives.\n ///\n /// @param[in] message The data describing this message.\n virtual void OnMessage(const Message& message) = 0;\n\n /// Called on the client when a registration token arrives. This function\n /// will eventually be called in response to a call to\n /// firebase::messaging::Initialize(...).\n ///\n /// @param[in] token The registration token.\n virtual void OnTokenReceived(const char* token) = 0;\n};\n\nThen, my own listener for iOS, h file\n\n#ifndef NotificationHandlerIOS_hpp\n#define NotificationHandlerIOS_hpp\n#include \"NotificationHandler.h\"\n#include <iostream>\n#include \"firebase/messaging.h\"\n\nstruct NotificationHandlerIOS : public firebase::messaging::Listener\n{\n  ~NotificationHandlerIOS() override;\n  void OnMessage(const ::firebase::messaging::Message& message) override final;\n  void OnTokenReceived(const char* token) override final;\n\n};\n#endif /* NotificationHandlerIOS_hpp */\n\nAnd finally, the cpp file\n\n#include \"NotificationHandlerIOS.hpp\"\n#include \"NotificationHandler.h\"\n#include <iostream>\n\n\nvoid NotificationHandlerIOS::OnMessage(const ::firebase::messaging::Message& message)\n{\n  qDebug() << message.raw_data;\n}\n\nvoid NotificationHandlerIOS::OnTokenReceived(const char* token)\n{\n  qDebug() << token;\n  NotificationHandler::GetInstance()->RegisterToken(token);\n}\n\n\nNow, the fun part, the error :\n\nUnimplemented pure virtual method 'OnMessage' in 'NotificationHandlerIOS'", "comment": "Your posts seem to contain unformatted code. Please make sure to format your code otherwise your post may be removed.\n\nRead [our guidelines](https://www.reddit.com/r/cpp_questions/comments/48d4pc/important_read_before_posting/) for how to format your code.\n\n\n*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/cpp_questions) if you have any questions or concerns.*", "upvote_ratio": 40.0, "sub": "cpp_questions"}791{"thread_id": "uny3eq", "question": "Have you ever eaten horseradish?", "comment": "If we count wasabi as horseradish then yes,a lot of times... every time I eat sushi.", "upvote_ratio": 2030.0, "sub": "AskAnAmerican"}792{"thread_id": "uny3eq", "question": "Have you ever eaten horseradish?", "comment": "As a Jew I must eat horseradish at least once a year at passover. It's also good with roast beef.", "upvote_ratio": 1840.0, "sub": "AskAnAmerican"}793{"thread_id": "uny3eq", "question": "Have you ever eaten horseradish?", "comment": "Yes indeed.  Particularly if you count cocktail sauce - horseradish being a primary constituent.", "upvote_ratio": 1310.0, "sub": "AskAnAmerican"}794{"thread_id": "unybzo", "question": "altho i learned C/C++ , pointers , OOP design , etc in school but everything i do in job i ve learned on my own during summer breaks or weekends . Go , React , Git ,  docker  to name a few and i believe that this is the case for most of my classmates if not for everyone who works as SWE , it's true that school taught me a lot of things but i just don't use IAbstractAbstractFactory nor all those OOP heavy design patterns that i had been taught in univ .\n\nso what's the real difference between Self-taught and CS grad if they both taught them selves frameworks and languages (we talking about normal web stack not all those data eng,low level jobs ) ?", "comment": "Kind of. \nWithout a traditional CS education - you can go a whole career without understanding the likes of path finding algorithms, OS internals, distributed synchronization primitives, etc so you aren\u2019t forced to learn those things by the industry.\n\nHowever, understanding these concepts will make you a better software engineer and will give you the right intuitions to make sound engineering decisions.", "upvote_ratio": 2650.0, "sub": "CSCareerQuestions"}795{"thread_id": "unybzo", "question": "altho i learned C/C++ , pointers , OOP design , etc in school but everything i do in job i ve learned on my own during summer breaks or weekends . Go , React , Git ,  docker  to name a few and i believe that this is the case for most of my classmates if not for everyone who works as SWE , it's true that school taught me a lot of things but i just don't use IAbstractAbstractFactory nor all those OOP heavy design patterns that i had been taught in univ .\n\nso what's the real difference between Self-taught and CS grad if they both taught them selves frameworks and languages (we talking about normal web stack not all those data eng,low level jobs ) ?", "comment": "IME, the difference between self-taught programmers and formally taught programmers mainly boils down to whether someone else forced them to put some uncommon tools in their \u201cmental toolbox\u201d. Those tools aren\u2019t always used every day (if they were, self-taught folks would learn them), but they are useful occasionally and are necessary to efficiently tackle some types of problems (which are fortunately somewhat uncommon in actual business products). \n\nTL;DR: it\u2019s hard to know what you don\u2019t know, so if you teach yourself without getting feedback from someone who knows more, you tend to end up with gaps around the difficult/uncommon topics.", "upvote_ratio": 2540.0, "sub": "CSCareerQuestions"}796{"thread_id": "unybzo", "question": "altho i learned C/C++ , pointers , OOP design , etc in school but everything i do in job i ve learned on my own during summer breaks or weekends . Go , React , Git ,  docker  to name a few and i believe that this is the case for most of my classmates if not for everyone who works as SWE , it's true that school taught me a lot of things but i just don't use IAbstractAbstractFactory nor all those OOP heavy design patterns that i had been taught in univ .\n\nso what's the real difference between Self-taught and CS grad if they both taught them selves frameworks and languages (we talking about normal web stack not all those data eng,low level jobs ) ?", "comment": "a CS degree teaches you the fundamentals that you can apply to most languages", "upvote_ratio": 520.0, "sub": "CSCareerQuestions"}797{"thread_id": "unyg77", "question": "Three  years ago, we revealed the first image of a black hole. Today, we announce groundbreaking results on the center of our galaxy.\n\nWe'll be answering questions from 1:30-3:30 PM Eastern Time (17:30-19:30 UTC)!\n\nThe Event Horizon Telescope (EHT) - a planet-scale array of eleven ground-based radio telescopes forged through international collaboration - was designed to capture images of a black hole. As we continue to delve into data from past observations and pave the way for the next generation of black hole science, we wanted to answer some of your questions! You might ask us about:\n\n+ Observing with a global telescope array\n+ Black hole theory and simulations\n+ The black hole imaging process\n+ Technology and engineering in astronomy\n+ International collaboration at the EHT\n+ The next-generation Event Horizon Telescope (ngEHT)\n+ ... and our recent results!\n\nOur Panel Members consist of:\n\n+ Michi Baub\u00f6ck, Postdoctoral Research Associate at the University of Illinois Urbana-Champaign\n+ Nicholas Conroy, Astronomy PhD Student at the University of Illinois Urbana-Champaign\n+ Vedant Dhruv, Physics PhD Student at the University of Illinois Urbana-Champaign\n+ Razieh Emami, Institute for Theory and Computation Fellow at the Center for Astrophysics | Harvard & Smithsonian\n+ Joseph Farah, Astrophysics PhD Student at University of California, Santa Barbara\n+ Raquel Fraga-Encinas, PhD Student at Radboud University Nijmegen, The Netherlands\n+ Abhishek Joshi, Physics PhD Student at University of Illinois Urbana-Champaign\n+ Jun Yi (Kevin) Koay, Support Astronomer at the Academia Sinica Institute of Astronomy and Astrophysics, Taiwan\n+ Yutaro Kofuji, Astronomy PhD Student at the University of Tokyo and National Astronomical Observatory of Japan\n+ Noemi La Bella,  PhD Student at Radboud University Nijmegen, The Netherlands\n+ David Lee, Physics PhD Student at University of Illinois Urbana-Champaign\n+ Amy Lowitz, Research Scientist at the University of Arizona\n+ Lia Medeiros, NSF Astronomy and Astrophysics Fellow at the Institute for Advanced Study, Princeton\n+  Wanga Mulaudzi, Astrophysics PhD Student at the Anton Pannekoek Institute for Astronomy at the University of Amsterdam\n+ Alejandro Mus, PhD Student at the Universitat de Val\u00e8ncia, Spain\n+ Gibwa Musoke, NOVA-VIA Postdoctoral Fellow at the Anton Pannekoek Institute for Astronomy, University of Amsterdam\n+ Ben Prather, Physics PhD Student at University of Illinois Urbana-Champaign\n+ Jan R\u00f6der, Astrophysics PhD Student at the Max Planck Institute for Radio Astronomy in Bonn, Germany\n+ Jesse Vos, PhD Student at Radboud University Nijmegen, The Netherlands\n+ Michael F. Wondrak, Radboud Excellence Fellow at Radboud University Nijmegen, The Netherlands\n+ Gunther Witzel, Staff Scientists at the Max Planck Institute for Radioastronomy, Germany\n+ George N. Wong, Member at the Institute for Advanced Study and Associate Research Scholar in the Princeton Gravity Initiative\n\nIf you'd like to learn more about us, you can also check out our [Website](https://eventhorizontelescope.org/), [Facebook](https://www.facebook.com/ehtelescope/), [Twitter](https://twitter.com/ehtelescope),\n[Instagram](https://www.instagram.com/ehtelescope), and [YouTube](https://www.youtube.com/channel/UC4sItzYomoJ6Flt0aDyHMOQ). We look forward to answering your questions!\n\nUsername: /u/EHTelescope", "comment": "What is the groundbreaking result?", "upvote_ratio": 1470.0, "sub": "AskScience"}798{"thread_id": "unyg77", "question": "Three  years ago, we revealed the first image of a black hole. Today, we announce groundbreaking results on the center of our galaxy.\n\nWe'll be answering questions from 1:30-3:30 PM Eastern Time (17:30-19:30 UTC)!\n\nThe Event Horizon Telescope (EHT) - a planet-scale array of eleven ground-based radio telescopes forged through international collaboration - was designed to capture images of a black hole. As we continue to delve into data from past observations and pave the way for the next generation of black hole science, we wanted to answer some of your questions! You might ask us about:\n\n+ Observing with a global telescope array\n+ Black hole theory and simulations\n+ The black hole imaging process\n+ Technology and engineering in astronomy\n+ International collaboration at the EHT\n+ The next-generation Event Horizon Telescope (ngEHT)\n+ ... and our recent results!\n\nOur Panel Members consist of:\n\n+ Michi Baub\u00f6ck, Postdoctoral Research Associate at the University of Illinois Urbana-Champaign\n+ Nicholas Conroy, Astronomy PhD Student at the University of Illinois Urbana-Champaign\n+ Vedant Dhruv, Physics PhD Student at the University of Illinois Urbana-Champaign\n+ Razieh Emami, Institute for Theory and Computation Fellow at the Center for Astrophysics | Harvard & Smithsonian\n+ Joseph Farah, Astrophysics PhD Student at University of California, Santa Barbara\n+ Raquel Fraga-Encinas, PhD Student at Radboud University Nijmegen, The Netherlands\n+ Abhishek Joshi, Physics PhD Student at University of Illinois Urbana-Champaign\n+ Jun Yi (Kevin) Koay, Support Astronomer at the Academia Sinica Institute of Astronomy and Astrophysics, Taiwan\n+ Yutaro Kofuji, Astronomy PhD Student at the University of Tokyo and National Astronomical Observatory of Japan\n+ Noemi La Bella,  PhD Student at Radboud University Nijmegen, The Netherlands\n+ David Lee, Physics PhD Student at University of Illinois Urbana-Champaign\n+ Amy Lowitz, Research Scientist at the University of Arizona\n+ Lia Medeiros, NSF Astronomy and Astrophysics Fellow at the Institute for Advanced Study, Princeton\n+  Wanga Mulaudzi, Astrophysics PhD Student at the Anton Pannekoek Institute for Astronomy at the University of Amsterdam\n+ Alejandro Mus, PhD Student at the Universitat de Val\u00e8ncia, Spain\n+ Gibwa Musoke, NOVA-VIA Postdoctoral Fellow at the Anton Pannekoek Institute for Astronomy, University of Amsterdam\n+ Ben Prather, Physics PhD Student at University of Illinois Urbana-Champaign\n+ Jan R\u00f6der, Astrophysics PhD Student at the Max Planck Institute for Radio Astronomy in Bonn, Germany\n+ Jesse Vos, PhD Student at Radboud University Nijmegen, The Netherlands\n+ Michael F. Wondrak, Radboud Excellence Fellow at Radboud University Nijmegen, The Netherlands\n+ Gunther Witzel, Staff Scientists at the Max Planck Institute for Radioastronomy, Germany\n+ George N. Wong, Member at the Institute for Advanced Study and Associate Research Scholar in the Princeton Gravity Initiative\n\nIf you'd like to learn more about us, you can also check out our [Website](https://eventhorizontelescope.org/), [Facebook](https://www.facebook.com/ehtelescope/), [Twitter](https://twitter.com/ehtelescope),\n[Instagram](https://www.instagram.com/ehtelescope), and [YouTube](https://www.youtube.com/channel/UC4sItzYomoJ6Flt0aDyHMOQ). We look forward to answering your questions!\n\nUsername: /u/EHTelescope", "comment": "I was surprised to see that Sag A* changed in such a short timescale. What's the time resolution you can achieve? I guess you can't image events shorter than one hour or so. What's the limiting factor? Can a image taken over a shorter length of time become less blurred, or is the optical resolution the cause of the blurriness of the image of Sag A*?", "upvote_ratio": 1230.0, "sub": "AskScience"}799{"thread_id": "unyg77", "question": "Three  years ago, we revealed the first image of a black hole. Today, we announce groundbreaking results on the center of our galaxy.\n\nWe'll be answering questions from 1:30-3:30 PM Eastern Time (17:30-19:30 UTC)!\n\nThe Event Horizon Telescope (EHT) - a planet-scale array of eleven ground-based radio telescopes forged through international collaboration - was designed to capture images of a black hole. As we continue to delve into data from past observations and pave the way for the next generation of black hole science, we wanted to answer some of your questions! You might ask us about:\n\n+ Observing with a global telescope array\n+ Black hole theory and simulations\n+ The black hole imaging process\n+ Technology and engineering in astronomy\n+ International collaboration at the EHT\n+ The next-generation Event Horizon Telescope (ngEHT)\n+ ... and our recent results!\n\nOur Panel Members consist of:\n\n+ Michi Baub\u00f6ck, Postdoctoral Research Associate at the University of Illinois Urbana-Champaign\n+ Nicholas Conroy, Astronomy PhD Student at the University of Illinois Urbana-Champaign\n+ Vedant Dhruv, Physics PhD Student at the University of Illinois Urbana-Champaign\n+ Razieh Emami, Institute for Theory and Computation Fellow at the Center for Astrophysics | Harvard & Smithsonian\n+ Joseph Farah, Astrophysics PhD Student at University of California, Santa Barbara\n+ Raquel Fraga-Encinas, PhD Student at Radboud University Nijmegen, The Netherlands\n+ Abhishek Joshi, Physics PhD Student at University of Illinois Urbana-Champaign\n+ Jun Yi (Kevin) Koay, Support Astronomer at the Academia Sinica Institute of Astronomy and Astrophysics, Taiwan\n+ Yutaro Kofuji, Astronomy PhD Student at the University of Tokyo and National Astronomical Observatory of Japan\n+ Noemi La Bella,  PhD Student at Radboud University Nijmegen, The Netherlands\n+ David Lee, Physics PhD Student at University of Illinois Urbana-Champaign\n+ Amy Lowitz, Research Scientist at the University of Arizona\n+ Lia Medeiros, NSF Astronomy and Astrophysics Fellow at the Institute for Advanced Study, Princeton\n+  Wanga Mulaudzi, Astrophysics PhD Student at the Anton Pannekoek Institute for Astronomy at the University of Amsterdam\n+ Alejandro Mus, PhD Student at the Universitat de Val\u00e8ncia, Spain\n+ Gibwa Musoke, NOVA-VIA Postdoctoral Fellow at the Anton Pannekoek Institute for Astronomy, University of Amsterdam\n+ Ben Prather, Physics PhD Student at University of Illinois Urbana-Champaign\n+ Jan R\u00f6der, Astrophysics PhD Student at the Max Planck Institute for Radio Astronomy in Bonn, Germany\n+ Jesse Vos, PhD Student at Radboud University Nijmegen, The Netherlands\n+ Michael F. Wondrak, Radboud Excellence Fellow at Radboud University Nijmegen, The Netherlands\n+ Gunther Witzel, Staff Scientists at the Max Planck Institute for Radioastronomy, Germany\n+ George N. Wong, Member at the Institute for Advanced Study and Associate Research Scholar in the Princeton Gravity Initiative\n\nIf you'd like to learn more about us, you can also check out our [Website](https://eventhorizontelescope.org/), [Facebook](https://www.facebook.com/ehtelescope/), [Twitter](https://twitter.com/ehtelescope),\n[Instagram](https://www.instagram.com/ehtelescope), and [YouTube](https://www.youtube.com/channel/UC4sItzYomoJ6Flt0aDyHMOQ). We look forward to answering your questions!\n\nUsername: /u/EHTelescope", "comment": "Can you tell us a bit more about the user interface with the telescope? I can't imagine you're taking turns looking through a single eyeglass.", "upvote_ratio": 860.0, "sub": "AskScience"}800{"thread_id": "unym8g", "question": "What American people think about Malcolm X beliefs (the beliefs that he held before his pilgrimage to Mecca) ?", "comment": "I doubt most Americans have any idea what those beliefs were.", "upvote_ratio": 1400.0, "sub": "AskAnAmerican"}801{"thread_id": "unym8g", "question": "What American people think about Malcolm X beliefs (the beliefs that he held before his pilgrimage to Mecca) ?", "comment": "Complex guy and certainly a product of a system that thoroughly oppressed black people. I think he was very bitter before and after the Nation of Islam. One could hardly blame him.", "upvote_ratio": 840.0, "sub": "AskAnAmerican"}802{"thread_id": "unym8g", "question": "What American people think about Malcolm X beliefs (the beliefs that he held before his pilgrimage to Mecca) ?", "comment": "Some oc his beliefs have been distorted in the historiography, but he was clearly antisemitic.", "upvote_ratio": 500.0, "sub": "AskAnAmerican"}803{"thread_id": "unzh6q", "question": "I need a car in LA on short notice. I am worried I am gonna book a Mustang and end up in a Sebring. SIXT also seems so cheap, why does nobody talk about them?", "comment": "If you're having to book last minute you're kinda shit outta luck", "upvote_ratio": 320.0, "sub": "AskAnAmerican"}804{"thread_id": "unzh6q", "question": "I need a car in LA on short notice. I am worried I am gonna book a Mustang and end up in a Sebring. SIXT also seems so cheap, why does nobody talk about them?", "comment": "I\u2019ve never heard of them. A quick search came up with the fact that they have few locations in the US and very low customer satisfaction ratings.\n\nI would try to find a more reputable company if it\u2019s a possibility, but if you proceed with this one, make sure you take photos of the car inside and out before you leave the lot and after you return it.", "upvote_ratio": 150.0, "sub": "AskAnAmerican"}805{"thread_id": "unzh6q", "question": "I need a car in LA on short notice. I am worried I am gonna book a Mustang and end up in a Sebring. SIXT also seems so cheap, why does nobody talk about them?", "comment": "Good news! Sebrings haven't been made for like 10 years. Pretty sure the only convertibles in mainstream rental fleets currently are Mustangs and Camaros. Don't expect a V8, though.\n\n(I assume you're talking about convertibles, because how else would a Mustang and a Sebring be in the same class?)\n\nThe \"or similar\" categories are always a bit of a crapshoot.\n\nRental cars are expensive right now because the companies sold off their fleets in 2020 when nobody was traveling and the new car market has since gone nuts.\n\nTuro may be worth a look, especially if you want something fun or interesting. It's Airbnb for cars, basically. I haven't used them, but I've heard that they have tons of hidden taxes and fees that blow the final price significantly higher than you might expect.", "upvote_ratio": 110.0, "sub": "AskAnAmerican"}806{"thread_id": "unzjbt", "question": "I am referring to a ram and not a particular memory address. Do rams' not have single input output?", "comment": "It really depends on the system architecture. If there are multiple memory controllers or if the memory controller can queue/coalesce multiple requests into one cycle then yes multiple processes can technically access memory at the same time. Keep in mind that cpus also use cache on the chip so often times in a multi core environment you can have concurrent processes that get all the data they need from the cache.", "upvote_ratio": 50.0, "sub": "AskComputerScience"}807{"thread_id": "uo00s4", "question": "Redditors of U.S.A, is there at least free healthcare for children in your country? Or is there at least some sort of support system established if the child is ill and is in dire need of medical attention?", "comment": "I'm not defending the US healthcare system because it DOES suck...but I find it so funny that the foreign perception of it is so dystopian.", "upvote_ratio": 580.0, "sub": "AskAnAmerican"}808{"thread_id": "uo00s4", "question": "Redditors of U.S.A, is there at least free healthcare for children in your country? Or is there at least some sort of support system established if the child is ill and is in dire need of medical attention?", "comment": "Yes to both, more or less. \n\nChildren are covered under their parents insurance, which the vast majority of people have. If they are living at poverty levels they are eleigible for government paid healthcare. \n\nEmergency services can not be denied to any person by federal law.", "upvote_ratio": 380.0, "sub": "AskAnAmerican"}809{"thread_id": "uo00s4", "question": "Redditors of U.S.A, is there at least free healthcare for children in your country? Or is there at least some sort of support system established if the child is ill and is in dire need of medical attention?", "comment": "It's amazing at how foreign posters have access to the greatest medical care in the world while the US has none but we at least have search engines that work.", "upvote_ratio": 290.0, "sub": "AskAnAmerican"}810{"thread_id": "uo0clb", "question": "I'd like to practice the low level socket programming and Rust at the same time. From what I've seen so far is that socket2 crate is the most suitable for this. It is small, lean with pretty much no overhead. In top of that it supports multiple OS. So, this is what I'm gonna use. \nHowever, I was wondering if you could recommend any resources just for the sockets, so that I can learn how to use them at the low level (and actually start utilizing the socket2)? I believe both Berkeley and Winsock have similar APIs, but I would like to avoid getting into reading the RFCs or detailed docs at this stage, and focus on something light, just to get me started. Any suggestions?", "comment": "> I was wondering if you could recommend any resources just for the sockets, so that I can learn how to use them\n\nBeej's Guide to Network Programming is frequently recommended in cases like these - https://beej.us/guide/bgnet/", "upvote_ratio": 60.0, "sub": "LearnRust"}811{"thread_id": "uo0d0r", "question": "What are long term side effects of tonsils removal ?", "comment": "[removed]", "upvote_ratio": 60.0, "sub": "AskScience"}812{"thread_id": "uo18uw", "question": "How do I find a room in US before arriving? I got accepted to a program in US and start my degree in september this year. I want to start looking for a place now and not leave it to the end", "comment": "Absolutely contact your school. Almost every college or university has an office specifically tasked with helping international students with questions just like this. \n\nI will say it is good you are starting early but given how college rentals work you may not be able to find a place until closer to the time you want to begin rent. However, you can get advice from your school administrators and they will know best what the local market is like.", "upvote_ratio": 370.0, "sub": "AskAnAmerican"}813{"thread_id": "uo18uw", "question": "How do I find a room in US before arriving? I got accepted to a program in US and start my degree in september this year. I want to start looking for a place now and not leave it to the end", "comment": "Use the housing resources of the school you are attending. The people you worked with for your admission are the first people you should be asking. Room and housing rentals around schools are very localized, often owned by private landlords who don't need to use websites. Start with the school website or office for international students.", "upvote_ratio": 110.0, "sub": "AskAnAmerican"}814{"thread_id": "uo18uw", "question": "How do I find a room in US before arriving? I got accepted to a program in US and start my degree in september this year. I want to start looking for a place now and not leave it to the end", "comment": "Going to chime into the group as well, and say reach out to the school.\n\nHowever, if it's some type of program that doesn't have your typical school resources, feel free to give us an idea where and maybe we can suggest local resources.  Or look for a subreddit that is local to where you are going to be, and ask there.", "upvote_ratio": 50.0, "sub": "AskAnAmerican"}815{"thread_id": "uo1f4l", "question": "So i have a `TextureManager` class and there is a function to draw sprite sheets. I have a `static int32_t` inside the function because the draw function is called inside a while loop, and it is initialized to 0 at the beginning. The issue is when I call the function many times, its clashing with the other sprite sheet animations which use the same method. How can I make a static variable specific to that function and so that a new one is created every time the function is called? (or something along those lines)\n\nThanks in advance! (please forgive any grammatical errors or typos)\n\nEDIT: I was able to solve this issue thanks to everyone's help, i created a new class for the sprite which stores the information needed, again a huge thanks to everyone!", "comment": "> How can I make a static variable specific to that function and so that a new one is created every time the function is called?\n\nDon't make it `static`? Uh, I guess.\n\n> because \n\nNo, there's probably a way to avoid it.", "upvote_ratio": 70.0, "sub": "cpp_questions"}816{"thread_id": "uo1f4l", "question": "So i have a `TextureManager` class and there is a function to draw sprite sheets. I have a `static int32_t` inside the function because the draw function is called inside a while loop, and it is initialized to 0 at the beginning. The issue is when I call the function many times, its clashing with the other sprite sheet animations which use the same method. How can I make a static variable specific to that function and so that a new one is created every time the function is called? (or something along those lines)\n\nThanks in advance! (please forgive any grammatical errors or typos)\n\nEDIT: I was able to solve this issue thanks to everyone's help, i created a new class for the sprite which stores the information needed, again a huge thanks to everyone!", "comment": ">so that a new one is created every time the function is called? (or something along those lines)\n\nYou just described a local variable.", "upvote_ratio": 40.0, "sub": "cpp_questions"}817{"thread_id": "uo1f4l", "question": "So i have a `TextureManager` class and there is a function to draw sprite sheets. I have a `static int32_t` inside the function because the draw function is called inside a while loop, and it is initialized to 0 at the beginning. The issue is when I call the function many times, its clashing with the other sprite sheet animations which use the same method. How can I make a static variable specific to that function and so that a new one is created every time the function is called? (or something along those lines)\n\nThanks in advance! (please forgive any grammatical errors or typos)\n\nEDIT: I was able to solve this issue thanks to everyone's help, i created a new class for the sprite which stores the information needed, again a huge thanks to everyone!", "comment": "Each sprite sheet needs to be its own object, this is kind of the main reason classes and instantiated objects of classes exist.", "upvote_ratio": 30.0, "sub": "cpp_questions"}818{"thread_id": "uo1k0g", "question": "There are many cases of species evolving to lose limbs for a snake-like bodyplan or losing other organs, is there any occasion where a species regains the use of a vestigial body part?", "comment": "I don't know if it qualifies as a body part but primates did regain color vision, a trait that all early mammals had lost in favor of better night vision.\n\nThe commonly accepted theory is that it was an evolutionary trait the benefited primates in determining what fruits were ripe to eat as well as differentiating different fruits by color.", "upvote_ratio": 100.0, "sub": "AskScience"}819{"thread_id": "uo1m7j", "question": "Specifically, what age do you guys pay off your full mortgage loan usually?\n\nEdit: as far as I understand from the comments people usually BUY houses when creating a family. Do you guys have some kind of benefits for young families/young families with kids?", "comment": "\u201cGet your own place\u201d and \u201cpay off your mortgage loan\u201d are not synonymous in the US. \u201cGet your own place\u201d usually means moving out of your parents\u2019 home into a home that you\u2019re paying for. That usually happens between 18 and 25, but it\u2019s becoming more normal to go longer. People usually don\u2019t pay off their mortgage until their 50s at least. I\u2019m not going to pay mine off until I\u2019m 56 at least. For others it will be longer.", "upvote_ratio": 4050.0, "sub": "AskAnAmerican"}820{"thread_id": "uo1m7j", "question": "Specifically, what age do you guys pay off your full mortgage loan usually?\n\nEdit: as far as I understand from the comments people usually BUY houses when creating a family. Do you guys have some kind of benefits for young families/young families with kids?", "comment": ">  what age do you guys pay off your full mortgage loan usually?\n\nThe only people I know that have paid off mortgages are in their 50s or older. Our mortgages typically run 30 years.\n\n[According to credit agencies](https://www.experian.com/blogs/ask-experian/research/average-age-to-buy-a-house/), the average age of a first time homeowner in the US is 34. So they'll be free when they're 64.", "upvote_ratio": 1170.0, "sub": "AskAnAmerican"}821{"thread_id": "uo1m7j", "question": "Specifically, what age do you guys pay off your full mortgage loan usually?\n\nEdit: as far as I understand from the comments people usually BUY houses when creating a family. Do you guys have some kind of benefits for young families/young families with kids?", "comment": "I\u2019m wondering what you imagine life is like in a house before you fully pay off your mortgage.\n\nHaving a house that you still owe on the mortgage is just having a house. You own it. You can paint it or add a room or convert the garage or whatever else you want to do. You owe money and the bank could theoretically take the house if you stop paying them back. But if you bought a house where the mortgage is in your budget that hopefully won\u2019t be an issue.\n\nLiving in a house you own but still owe money on is very much \u201chaving your own place.\u201d", "upvote_ratio": 810.0, "sub": "AskAnAmerican"}822{"thread_id": "uo2e0o", "question": "Apologies if this has been asked before but I couldn't find any conclusive answer.\n\nI've decided to learn C++ over the summer and so was wondering what IDE to use. For information I have a 2020 M1 MacBook Pro. Thanks in advance.", "comment": "Clion is my favorite but quite expensive", "upvote_ratio": 30.0, "sub": "cpp_questions"}823{"thread_id": "uo2e0o", "question": "Apologies if this has been asked before but I couldn't find any conclusive answer.\n\nI've decided to learn C++ over the summer and so was wondering what IDE to use. For information I have a 2020 M1 MacBook Pro. Thanks in advance.", "comment": "I do all my development on an M1 mac (then port to Linux and Windows), Install xcode and the tools (it does come in handy from time to time), In particular you can just install the command line tools if you are not using xcode.\n\nThen install VSCode and CMake and use that. It is by far the best cross platform solution and works really well. I find xcode over complicated for basic C++ development (for example adding frameworks / libraries) as apposed to using something like vcpkg and cmake.", "upvote_ratio": 30.0, "sub": "cpp_questions"}824{"thread_id": "uo2e0o", "question": "Apologies if this has been asked before but I couldn't find any conclusive answer.\n\nI've decided to learn C++ over the summer and so was wondering what IDE to use. For information I have a 2020 M1 MacBook Pro. Thanks in advance.", "comment": "If you\u2019re on Mac then Xcode is your best bet.  Especially for c++.  You could use VS Code with some kind of c++ compiler, and learn how to use the command line but that would be a little more involved.  Xcode gets the job done if this is your introduction into programming", "upvote_ratio": 30.0, "sub": "cpp_questions"}825{"thread_id": "uo2j0i", "question": "How much of your monthly wage is spent on rent/mortage?\nIn my country people usually have to spent more than a half of their wage for being able to afford rent", "comment": "$4000/month for a 2br apartment in Central Boston (Seaport).", "upvote_ratio": 1030.0, "sub": "AskAnAmerican"}826{"thread_id": "uo2j0i", "question": "How much of your monthly wage is spent on rent/mortage?\nIn my country people usually have to spent more than a half of their wage for being able to afford rent", "comment": "Don't pay rent. I currently live in my car because San Diego housing\n\nIt's that or spend 50% of my monthly income on a room", "upvote_ratio": 880.0, "sub": "AskAnAmerican"}827{"thread_id": "uo2j0i", "question": "How much of your monthly wage is spent on rent/mortage?\nIn my country people usually have to spent more than a half of their wage for being able to afford rent", "comment": "My mortgage is 1200 and we are < 4 years from paying that bitch off.\n\nNo more debt after then.  Just in time for the apocalypse.", "upvote_ratio": 760.0, "sub": "AskAnAmerican"}828{"thread_id": "uo2mel", "question": "There are systems with multiple stars, red and blue giants that would consume our sun for a breakfast, stars that die and reborn every couple of years and so on. Is there anything that set our star apart from the others like the ones mentioned above? Anything that we can use to make aliens jealous?", "comment": "Well, the stars that you mention are less common than our little yellow dwarf star, which is a pretty common size (in general: the smaller the main sequence star, the more of them there are and the longer they live). It's also high-medium in metal, which makes sense given its robust planetary system, so that make our solar system 2nd or later generation supernova remains, which is also exceptionally common among stars in the observable universe. We're also in the middle of a medium-sized arm of the Milky Way, which is a medium-large galaxy in a fairly average-density region of the observable universe.", "upvote_ratio": 5580.0, "sub": "AskScience"}829{"thread_id": "uo2mel", "question": "There are systems with multiple stars, red and blue giants that would consume our sun for a breakfast, stars that die and reborn every couple of years and so on. Is there anything that set our star apart from the others like the ones mentioned above? Anything that we can use to make aliens jealous?", "comment": "Yes.\n\nThere is 1 aspect of the sun that is rare and that is solar variability. Our sun is unusually stable in terms of it's output and this has actually had an impact on our search for exoplanets. [Cool Worlds has done a video on it](https://youtu.be/TAQKJ41eDTs?t=801), and also [how this affected the Kepler Mission search for exoplanets](https://www.youtube.com/watch?v=IFx3r32r-GU&t=1334s).\n\nBasically, our sun was considered an \"average\" star in regards to variability when they were designing the Kepler mission. Surprisingly, this was not correct - and the noisiness of other stars meant that Kepler could no longer distinguish the transit of an Earth-like planet in front of a Sun-like star from noise during the original mission time-frame. An extension could have solved this by gathering more data points, but the telescope broke down before they got enough data.\n\nWhether our Sun's unusually stability has contributed to life emerging and flourishing is up for debate. But one can certainly see the benefits of having a stable home star - more stable climate, fewer freak radiation events, etc.", "upvote_ratio": 2470.0, "sub": "AskScience"}830{"thread_id": "uo2mel", "question": "There are systems with multiple stars, red and blue giants that would consume our sun for a breakfast, stars that die and reborn every couple of years and so on. Is there anything that set our star apart from the others like the ones mentioned above? Anything that we can use to make aliens jealous?", "comment": "Not really. Our star is part of the \"main sequence\" i.e. pretty typical. Though, technically, binary systems are more common than single star systems, so ours is slightly unusual in that respect. But single star systems are still pretty common.", "upvote_ratio": 2360.0, "sub": "AskScience"}831{"thread_id": "uo2sl9", "question": "there's an argument that its actually better for the west if Saudi Arabia and China remain dictatorships because if they had changes of government every several years it would disrupt the supply or oil and manufactured goods respectively.", "comment": "The US isn\u2019t reliant on oil from the Middle East, which accounts for 8% of the total imported to the country from that region. The most important oil producing country to the United States is Canada.\n\nThe US intervenes in the Middle East because so much of the rest of the world is dependent on their petroleum, not because we are. I think a better question is: since petroleum from the Middle East, especially Saudi Arabia, is necessary for the global economy to function, would those countries intervene?\n\nhttps://www.eia.gov/energyexplained/oil-and-petroleum-products/imports-and-exports.php", "upvote_ratio": 910.0, "sub": "AskAnAmerican"}832{"thread_id": "uo2sl9", "question": "there's an argument that its actually better for the west if Saudi Arabia and China remain dictatorships because if they had changes of government every several years it would disrupt the supply or oil and manufactured goods respectively.", "comment": "Welcome back Grapp. \n\nI suspect we would if they asked us to. I would hope not.", "upvote_ratio": 360.0, "sub": "AskAnAmerican"}833{"thread_id": "uo2sl9", "question": "there's an argument that its actually better for the west if Saudi Arabia and China remain dictatorships because if they had changes of government every several years it would disrupt the supply or oil and manufactured goods respectively.", "comment": "IMHO, the US cares less about Saudi Arabia with each passing day.  We don't even need their oil or airfields as much as we used to.  Notice the deafening silence after Iran attacked the Saudi oil facilities.  The US pretty much just shrugged.\n\nThe House of Saud has been so evil and duplicitous over the years that we will be glad to be rid of them.  Negotiate with whoever emerges as the winner.  They need our Navy to protect the Gulf much more than we need them for... well.. anything.", "upvote_ratio": 290.0, "sub": "AskAnAmerican"}834{"thread_id": "uo2xhy", "question": "I looked at multiple libraries online but all of them were either too complicated to learn to use or just straight up did not work. I am really demotivated to learn to make something like that because of the lack of good sources to learn and I thought about writing some code that opens geogebra with the function I give it displaying. But unfortunatelly I have no idea how to do that and it may not even be possible to make it in c++. If you can help me in any way I would really apreciate it? I consider myself a beginner so I don't really want anything complicated.", "comment": "C++ is Turing complete. If a computer is able to do it, c++ can do it.\n\nAlso, You're going to be a beginner forever unless you're willing to take some complicated things onto your plate.\n\nAre you attempting to make some sort of wrapper around this geogebra thing or do you legitimately want to do it all yourself and save it as png?\n\nWhat do you have so far? Have you put the carriage before the horses and started looking up rendering libs before you've worked on the graphing part of your codebase? Are you going to write an entire parser for the equations?\n\nWhat I want is more details about how you're wanting to do this.", "upvote_ratio": 30.0, "sub": "cpp_questions"}835{"thread_id": "uo2xhy", "question": "I looked at multiple libraries online but all of them were either too complicated to learn to use or just straight up did not work. I am really demotivated to learn to make something like that because of the lack of good sources to learn and I thought about writing some code that opens geogebra with the function I give it displaying. But unfortunatelly I have no idea how to do that and it may not even be possible to make it in c++. If you can help me in any way I would really apreciate it? I consider myself a beginner so I don't really want anything complicated.", "comment": "https://github.com/nothings/stb. specifically `stb_image_write.h`. This is a \"library\" (it's 1 file) which allows you to take an array of pixels and encode it as a PNG, if this is what you're looking for.\n\nYou can graph your function in this array of pixels by effectively treating it as a coordinate grid.", "upvote_ratio": 30.0, "sub": "cpp_questions"}836{"thread_id": "uo311l", "question": "In my experience, it seems like a great motivator for office based employees to wake up and get to work on time.\n\nThe pandemic and remote work is not the right answer here because many many companies were not giving free food before the pandemic, so it would just be an excuse for them at this point.", "comment": "Hahah I'd be inclined to go into an office if it meant I didn't have to figure out what to feed myself everyday", "upvote_ratio": 5830.0, "sub": "CSCareerQuestions"}837{"thread_id": "uo311l", "question": "In my experience, it seems like a great motivator for office based employees to wake up and get to work on time.\n\nThe pandemic and remote work is not the right answer here because many many companies were not giving free food before the pandemic, so it would just be an excuse for them at this point.", "comment": "I personally would not mind a \"free\" (no cost to you) meal offered by my employer. Big G had(maybe still do) snack bars within fifteen feet of cubicles, so it keeps workers more productive.", "upvote_ratio": 3780.0, "sub": "CSCareerQuestions"}838{"thread_id": "uo311l", "question": "In my experience, it seems like a great motivator for office based employees to wake up and get to work on time.\n\nThe pandemic and remote work is not the right answer here because many many companies were not giving free food before the pandemic, so it would just be an excuse for them at this point.", "comment": "It\u2019s actually extremely expensive. Like $20/employee/meal at one place I worked. That\u2019s like a $5000/yr cost per employee.\n\nI\u2019d rather have the $5000.", "upvote_ratio": 1910.0, "sub": "CSCareerQuestions"}839{"thread_id": "uo32h6", "question": "Hi all, I've been away from programming for a minute. When I first went through my programming level 2 course at university, I remember a bunch of the content and information being presented about static, abstract, static-abstract, and class methods. Most of it was really intuitive but there's a bunch of minutia that had to be kept in mind when making decisions architecturally. I haven't been able to find the book or my notes about that. I was wondering if anyone out there had recommendations on a good general Object Oriented Programming reference guide that would explain \"static methods act like this, they can do this, they can't access that. Class methods act like this...\" etc...\n\nThanks everyone in advance.", "comment": "Every language is slightly different. The details won't be the same everywhere.\n\nBut the basics are:\n\n- static methods don't use class instance, regular methods do\n- therefore, you can call a static method without an object\n- static fields don't use class instance either; they're essentially glorified globals\n- abstract methods are declared in base class but defined in derived class\n- therefore, a class with abstract methods cannot be instantiated (because there's no method implementation)\n- static abstract methods are only ever useful for generic code and few languages support them to start with\n\nFor everything else, refer to the beginner tutorial of the language of choice. It'll have everything you want to know, and what you read there probably won't be applicable to other languages.", "upvote_ratio": 30.0, "sub": "AskProgramming"}840{"thread_id": "uo32h6", "question": "Hi all, I've been away from programming for a minute. When I first went through my programming level 2 course at university, I remember a bunch of the content and information being presented about static, abstract, static-abstract, and class methods. Most of it was really intuitive but there's a bunch of minutia that had to be kept in mind when making decisions architecturally. I haven't been able to find the book or my notes about that. I was wondering if anyone out there had recommendations on a good general Object Oriented Programming reference guide that would explain \"static methods act like this, they can do this, they can't access that. Class methods act like this...\" etc...\n\nThanks everyone in advance.", "comment": "I understand what you are asking, but I will contend that such a thing as you have described does not exist, not \"language agnostic\" in any case.\n\nAs soon as you talk about \"classes\" or \"methods\", the discussion is no longer language agnostic. After all, Scheme doesn't use classes, and neither does JavaScript. Meanwhile Objective-C doesn't have methods, it has messages. These are not merely semantic differences either - they are language-specific functional differences.\n\nAll of that to say, I would be weary of information that was presented in an early-level university course on the topic. It may have been presented in a language-agnostic manner, but I'm willing to bet the content was tailored toward the language(s) used in the course. Treating it as universal can surely lead to problems if the information is applied without caution. Especially when you start talking about \"\\_\\_\\_\\_\\_ methods do this\" or \"\\_\\_\\_\\_\\_ classes do that\" - it's always going to have a \"flavor\" of the particular programming language.\n\nIf you are looking for information on overarching design methodology, there is of course the classic text [Design Patterns](https://en.wikipedia.org/wiki/Design_Patterns). There are valid criticisms of the book - it should not be taken as complete gospel, but it is really the only book of its kind, and it is absolutely required reading if you're trying to plan a large project. Read the book, understand the patterns, then once you pick a language for your project, search \"design patterns in {language}\" to get language-specific implementation ideas.", "upvote_ratio": 30.0, "sub": "AskProgramming"}841{"thread_id": "uo344v", "question": "Hi,\n\nLong story short, I\u2019m a bit lost and bit stuck. I\u2019ve been working in IT Support for almost 7 years and I\u2019m beginning to want more from it. I don\u2019t feel like I know it all, but I feel like this job is becoming easy and repetitive. I\u2019ve changed companies 3 times and each one has been very different but still I feel the same.\n\nI\u2019m looking to expand my knowledge and become a specialist. Whether that be security, networking, development, application testing etc I\u2019m not sure\u2026 I\u2019d like some fundamentals to put on my CV to get an opportunity. I was thinking of going for the MDM100 and MDM101 qualifications to get started, are there any recommendations on how to get out of 1st line?", "comment": "I left the front line to do analyst work. At first process analysis, then business analysis and now consulting. I love it. The day is always different and  there is never a shortage of things to focus on. \n\nI have Lean IT, ITIL3, and ITIL4 certs. I\u2019m getting agile product owner certified in July. \n\nI guess I\u2019m telling you all this because IT is a space where people think they need to have all these technical certs and programming experience to move up. But there is a business side to it too that you can transfer to any other industry.", "upvote_ratio": 30.0, "sub": "ITCareerQuestions"}842{"thread_id": "uo3c5j", "question": "I\u2019m new to programming and I\u2019m looking to figure out the certifications that\u2019ll give me an edge over my peers while interviewing for programming related jobs, any ideas", "comment": "The only certs that people are generally going to care about are DevOps-type certs like AWS stuff.", "upvote_ratio": 4780.0, "sub": "LearnProgramming"}843{"thread_id": "uo3c5j", "question": "I\u2019m new to programming and I\u2019m looking to figure out the certifications that\u2019ll give me an edge over my peers while interviewing for programming related jobs, any ideas", "comment": "Devops and system admin certs. \n\nLanguage specific is laughable. Example: I\u2019m a ciw certified web master, from 2003. It has NEVER been talked about.", "upvote_ratio": 1270.0, "sub": "LearnProgramming"}844{"thread_id": "uo3c5j", "question": "I\u2019m new to programming and I\u2019m looking to figure out the certifications that\u2019ll give me an edge over my peers while interviewing for programming related jobs, any ideas", "comment": "No one cares about certifications.", "upvote_ratio": 1210.0, "sub": "LearnProgramming"}845{"thread_id": "uo3k07", "question": " \n\n**My main question is how to prepare myself for this role with only 30 days left. Should I do TryHackMe, study for security+, both, etc. This internship will likely expose me and have me do work in cybersecurity risk, compliance, and incident response (Which I am most worried about).**\n\n**Second question: How is it possible that I was selected for this role, out of hundreds that applied????**\n\nFor context, the interview I had wasn't technical at all. All they asked me about was what the CIA triad was and explain how the 3-way handshake works (Which I didn't even know, but they were fine with it). The rest was all behavioral and interpersonal. I didn't lie or exaggerate on my resume either. I didn't list any cybersecurity tools and have no certifications, as I'm only a sophomore. They made little to no reference to my resume either and they never asked for references (At least till now). I also only had one interview and it lasted for approximately 50 minutes. Also, for those wondering, these people are not a scam or whatever, its an official agency. \n\nHowever, the job posting itself didn't have any technical requirements either. All it said was that I would serve as a cybersecurity analyst and will have exposure and do work within different departments (Risk, Compliance, Incident Response, etc.) inside the cybersecurity office. Also, during the interview, they were interested in whether I would want to stay long-term after finishing university, which I say yes to. **So, I suspect maybe they knew about my lack of qualifications, but saw I had growth potential and thought I could maybe be trained to fit their needs in the long-term. But I'm not 100% sure.** \n\n[Here is a link to my resume](https://imgur.com/BuZYrST)\n\nAlso, my prior internship work at the private intelligence company was not technical at all, aside from Tableau. The company is focused on foreign affairs, international relations, intelligence security work, etc. My \"OSINT\" experience was not technical and instead just limited to using pre-existing and internal company tools to conduct investigations.\n\nI'm really passionate about cybersecurity, but I had absolutely zero expectations that I would land this role, but I somehow magically did. Most of my applications were for basic IT/help desk roles. Any help/advice would be greatly appreciated cause I'm really stressed out. Also, let me know if you need more information. Thanks!", "comment": "It is an internship.   You are there to learn and they will reach you.   They won't let you do anything that could cause major damage.   Relax, go forth and learn.   Keep a positive attitude and always be willing to learn something new.", "upvote_ratio": 40.0, "sub": "ITCareerQuestions"}846{"thread_id": "uo3k07", "question": " \n\n**My main question is how to prepare myself for this role with only 30 days left. Should I do TryHackMe, study for security+, both, etc. This internship will likely expose me and have me do work in cybersecurity risk, compliance, and incident response (Which I am most worried about).**\n\n**Second question: How is it possible that I was selected for this role, out of hundreds that applied????**\n\nFor context, the interview I had wasn't technical at all. All they asked me about was what the CIA triad was and explain how the 3-way handshake works (Which I didn't even know, but they were fine with it). The rest was all behavioral and interpersonal. I didn't lie or exaggerate on my resume either. I didn't list any cybersecurity tools and have no certifications, as I'm only a sophomore. They made little to no reference to my resume either and they never asked for references (At least till now). I also only had one interview and it lasted for approximately 50 minutes. Also, for those wondering, these people are not a scam or whatever, its an official agency. \n\nHowever, the job posting itself didn't have any technical requirements either. All it said was that I would serve as a cybersecurity analyst and will have exposure and do work within different departments (Risk, Compliance, Incident Response, etc.) inside the cybersecurity office. Also, during the interview, they were interested in whether I would want to stay long-term after finishing university, which I say yes to. **So, I suspect maybe they knew about my lack of qualifications, but saw I had growth potential and thought I could maybe be trained to fit their needs in the long-term. But I'm not 100% sure.** \n\n[Here is a link to my resume](https://imgur.com/BuZYrST)\n\nAlso, my prior internship work at the private intelligence company was not technical at all, aside from Tableau. The company is focused on foreign affairs, international relations, intelligence security work, etc. My \"OSINT\" experience was not technical and instead just limited to using pre-existing and internal company tools to conduct investigations.\n\nI'm really passionate about cybersecurity, but I had absolutely zero expectations that I would land this role, but I somehow magically did. Most of my applications were for basic IT/help desk roles. Any help/advice would be greatly appreciated cause I'm really stressed out. Also, let me know if you need more information. Thanks!", "comment": "Keyword is \u201cinternship\u201d. They are a way for you to hands on learn (and make some cash). You\u2019ll be fine, I\u2019d be surprised if they sent you off to do something important without a seasoned person with you. Just enjoy the ride, take in all the info, be sure to network while you\u2019re there, and if you think you\u2019re going to screw something up just ask your trainer. Grats on the role bro!", "upvote_ratio": 30.0, "sub": "ITCareerQuestions"}847{"thread_id": "uo3md1", "question": "My father was a big time cocaine dealer for Fleetwood Mac, Kenny Loggins, Marsha Brady to name a few, in Los Angeles. AMA", "comment": "Does he have any memorabilia from the era? Is he still alive? Using?", "upvote_ratio": 2440.0, "sub": "AMA"}848{"thread_id": "uo3md1", "question": "My father was a big time cocaine dealer for Fleetwood Mac, Kenny Loggins, Marsha Brady to name a few, in Los Angeles. AMA", "comment": "What other kind of legitimate work did he do?\n\nHow did you find out?\n\nHow does your mom feel about it all?", "upvote_ratio": 1080.0, "sub": "AMA"}849{"thread_id": "uo3md1", "question": "My father was a big time cocaine dealer for Fleetwood Mac, Kenny Loggins, Marsha Brady to name a few, in Los Angeles. AMA", "comment": "Craziest anecdote he fed you about the scene back then?", "upvote_ratio": 810.0, "sub": "AMA"}850{"thread_id": "uo3mq3", "question": "This might be a question for 70 somethings since I'm 61, but for me it's TicToc. I did Facebook. I did Twitter. I did Instagram. Here I am on Reddit. I started creating a Tictoc account and felt the life force drain out of me. I simply closed the browser and went to watch Food Network. What's your \"no more\" moment?", "comment": "A bit long; sorry.\n\nOld academic here. I was there at the \"dawn of the internet\" so to speak.\n\nI sat at tables in the early 90s when we discussed where the internet was going. Much of the content in those days was academic stuff, researchers, nothing commercial, a few early adopters with files up on a server somewhere. We messed around sending huge files ftping (old dos commands for those too young to remember) them from Canada to California and were happy when it all went well. \n\nWhen we started talking about user generated content I  was mystified about what the average person had to really contribute to this new digital world. Not trying to be elitist, everyone is not an expert and no, most of your life is not interesting enough to be documented daily. I kept asking the question...what the heck is all this user generated content going to be?\n\nWell here we are \"the pinnacle of human technology\" (maybe) and we spend our time hating each other, having opinions make one wonder wtf, denigrating and debasing each other via a keyboard, and making cat videos and porn\n\nI have a love hate relationship with technology and the digital world. We did not have to scratch very hard to see some of the best and worst of human nature, all while never uttering a word in person. \n\nI have never had facebook, twitter or instagram. I have been on reddit with several user names through the years since about 2008 or so. I limit my online presence. I know that the data is the gold and I am not giving up mine without something more than access to some website.\n\nEDIT: short answer about 1998", "upvote_ratio": 1760.0, "sub": "AskOldPeople"}851{"thread_id": "uo3mq3", "question": "This might be a question for 70 somethings since I'm 61, but for me it's TicToc. I did Facebook. I did Twitter. I did Instagram. Here I am on Reddit. I started creating a Tictoc account and felt the life force drain out of me. I simply closed the browser and went to watch Food Network. What's your \"no more\" moment?", "comment": "Just gone through surgical menopause. My remaining fucks magically disappeared along with my uterus. I feel much better all round.", "upvote_ratio": 1420.0, "sub": "AskOldPeople"}852{"thread_id": "uo3mq3", "question": "This might be a question for 70 somethings since I'm 61, but for me it's TicToc. I did Facebook. I did Twitter. I did Instagram. Here I am on Reddit. I started creating a Tictoc account and felt the life force drain out of me. I simply closed the browser and went to watch Food Network. What's your \"no more\" moment?", "comment": "When everything quit being words and turned into film clips. that isn't interaction. \n I cant .", "upvote_ratio": 1050.0, "sub": "AskOldPeople"}853{"thread_id": "uo3quw", "question": "//--TO DO--//\n\n//add biome system |Check|\n\n//add per biome mob and structure system |Alted due to minor priority|\n\n//add format to cout for inventory and armor |Check|\n\n//upgrade damage and armor system\n\n//add objects quantity\n\n//add a save and load system |Not working|\n\n//add crafting system |Make a true shaped crafing system|\n\n//add a a inventory managment system\n\n//--TO FIX--//\n\n//|Check| When you encounter a creeper and after you walk you will die for no reason {\n\n//Possible cause: probably the program subtract 10 hp twice instead it should remove 10 hp per creeper encounter\n\n//Possible fix: fix Mattia's brain}\n\n//|Check| Trying to use for loop to detect with item is inserted into the crafting table {\n\n//Result: program crashed\n\n//Possible fix: learn how to use for loop or contact loxo}\n\n//Mattia's knowledge of C++ {\n\n//Possible cause: Mattia's bad knowledge about C++\n\n//Possible fix: Read a book}\n\n//When you save the armor array, you are also saving junk{\n\n//Result: garbage data into the save file\n\n//Possible fix: (bad idea) dissect and save single array elemnt or wait to put element int it before saving}\n\n\\#include <iostream>\n\n\\#include <string.h>\n\n\\#include <iomanip>\n\n\\#include <time.h>\n\n\\#include <fstream>\n\n\\#define objsnum 6\n\n\\#define invnum 9\n\n\\#define biomesnum 6\n\nusing namespace std;\n\n//#pragma pack(4)\n\nstruct plys{\n\nint hp;\n\nint exp;\n\nstring inv\\[invnum\\]={\"air\",\"air\",\"air\",\"air\",\"air\",\"air\",\"air\",\"air\",\"air\"};\n\nstring arms\\[4\\]={\"slot1\",\"slot2\",\"slot3\",\"slot4\"};\n\nint armor;\n\nint dmg;\n\nstring biome;\n\nstring sword;\n\n}player;\n\nstruct mobs{\n\nint mdmg;\n\nint resis;\n\n}creeper,zombie,husk;\n\n//insert into inventory//\n\nvoid insinv(string item, int len){\n\nfor(int i=0; i<len; i++){\n\nif(player.inv\\[i\\]==\"air\"){\n\nplayer.inv\\[i\\]=item;\n\nbreak;\n\n}\n\n}\n\n}\n\nvoid savload(int type){\n\nstring buffinv\\[invnum\\];\n\nifstream testread(\"mine-save.bin\");\n\nFILE \\* pFile;\n\nstring output;\n\nint sizestr=sizeof(struct plys);\n\nint sizeinv=sizeof(player.inv\\[invnum\\]);[//player.inv](//player.inv)\\[invnum\\].size();\n\nint sizearmor=sizeof(player.arms\\[4\\]);[//player.arms](//player.arms)\\[4\\].size();\n\nint sizsinv=player.inv\\[invnum\\].size();\n\nint sizsarm=player.arms\\[4\\].size();\n\nint leninv=player.inv\\[invnum\\].length();\n\nint lenarm=player.arms\\[4\\].length();\n\nint aligstr=alignof(struct plys);\n\nint aliginv=alignof(player.inv\\[invnum\\]);\n\nint aligarm=alignof(player.arms\\[4\\]);\n\nint sizsword=player.sword.size();\n\nint sizbiome=player.biome.size();\n\nint sizhp=sizeof(player.hp);\n\nif(type==1){\n\n//for(int i; i>invnum; i++)buffinv\\[i\\]=\"air\";\n\n//memcpy(buffinv,player.inv,invnum);\n\ncopy(begin(player.inv), end(player.inv), begin(buffinv));\n\npFile = fopen (\"mine-save.bin\", \"wb\");\n\nfwrite (buffinv , sizeof(string), buffinv\\[invnum\\].size(), pFile);\n\nfclose (pFile);\n\ncout<<\"invetory saved (hopefully, i don't know how to make an actual check)\"<<endl;\n\nreturn;\n\n}\n\nif(type==2){\n\nfor(int i; i>invnum; i++)buffinv\\[i\\]=\"air\";\n\ntestread.seekg (0, testread.beg);\n\nwhile (getline (testread,output)) {\n\nfor(int i; i>invnum;i++)\n\nbuffinv\\[i\\]=output;\n\n}\n\ntestread.close();\n\n//copy(begin(buffinv),end(buffinv),begin(player.inv));\n\nmemcpy(player.inv,buffinv,invnum);\n\ncout<<\"loaded (hopefully, i don't know how to make an actual check)\"<<endl;\n\nreturn;\n\n}\n\n}\n\n//game function//\n\nvoid game(){\n\nsrand ( time(NULL) );\n\n//player varibale//\n\nplayer.hp=20;\n\nplayer.exp=0;\n\nplayer.dmg=1;\n\n//mobs damages//\n\nint dmgt=0;\n\n//Creeper\n\ncreeper.mdmg=10;\n\n//Zombie\n\nzombie.mdmg=2;\n\n//Husk\n\nhusk.mdmg=3;\n\n//variables//\n\nint stptot;\n\nint act;\n\nint invsl;\n\nint crfsl;\n\nbool debug=true;\n\nchar y;\n\nchar action;\n\nchar actin;\n\nchar actcr;\n\n//armor types and protection values//\n\n//Leather\n\nint lhlpr=1; //helmet\n\nint lchpr=3; //chestplate\n\nint llgpr=2; //leggings\n\nint lbtpr=1; //boots\n\n//Iron\n\nint ihlpr=2; //helmet\n\nint ichpr=6; //chestplate\n\nint ilgpr=5; //leggings\n\nint ibtpr=4; //boots\n\nstring crftb\\[9\\]={\"slot0\",\"slot1\",\"slot2\",\"slot3\",\"slot4\",\"slot5\",\"slot6\",\"slot7\",\"slot8\"};\n\nstring objs\\[objsnum\\]={\"Tree\",\"Creeper\",\"Cow\",\"Water\",\"Zombie\",\"Lava\"};\n\n//string \\*pobjs =objs;\n\nstring biomes\\[biomesnum\\]={\"Plains\",\"Desert\",\"Forest\",\"Hills\",\"Ice-Peeks\",\"Dark-Forest\"};\n\nstring buffinv\\[invnum\\];\n\nstring buffarmor\\[4\\];\n\nstring loadinv\\[invnum\\];\n\n//cout<<\"tutorial: to play type a number of steps\\\\n every ten steps you may find something\"<<endl;\n\n//armor calculator//\n\nif(player.arms\\[0\\]==\"air\")player.armor=player.armor+0;\n\nif(player.arms\\[1\\]==\"air\")player.armor=player.armor+0;\n\nif(player.arms\\[2\\]==\"air\")player.armor=player.armor+0;\n\nif(player.arms\\[3\\]==\"air\")player.armor=player.armor+0;\n\n//leather//\n\nif(player.arms\\[0\\]==\"let\\_helmet\")player.armor=player.armor+lhlpr;\n\nif(player.arms\\[1\\]==\"let\\_leggings\")player.armor=player.armor+lchpr;\n\nif(player.arms\\[2\\]==\"let\\_chestplate\")player.armor=player.armor+llgpr;\n\nif(player.arms\\[3\\]==\"let\\_boots\")player.armor=player.armor+lbtpr;\n\nwhile(true){\n\nsrand ( time(NULL) );\n\nif(debug==true)cout << \"\\\\033\\[1;31mATTENTION\\\\033\\[0m\\\\ndebug menu enabled\\\\ntype 5 to access it\"<<endl;\n\ncout<<\"type:\\\\n\\[1\\] Walk\\\\n\\[2\\] Browse and manage the invetory\\\\n\\[3\\] Crafting table\\\\n\\[4\\]Save or load (only player invemtory for now)\"<<endl;\n\ncin>>act;\n\nswitch(act){\n\ncase 1:{\n\n//core gameplay loop//\n\nint RandDis = rand() % 10;\n\nint RandBiomes = rand() % biomesnum;\n\nint RandDrop = rand() % 5;\n\nif(player.sword.empty())player.sword=\"bare-fists\";\n\nif(player.biome.empty()){\n\nRandBiomes = rand() % biomesnum;\n\nplayer.biome=biomes\\[RandBiomes\\];\n\n}\n\ncout<<\"type 'w' to walk and you may find something\"<<endl;\n\ncout<<\"current biome: \"<<player.biome<<endl;\n\ncout<<\"your current sword: \"<<player.sword<<endl;\n\ncin>>action;\n\nif(action=='m')return;\n\nif(player.hp<=0){\n\ncout<<\"you died!\"<<endl;\n\nexit(EXIT\\_SUCCESS);\n\n}\n\nif(action=='w'){\n\nint RandStp = rand() % 10;\n\nRandStp = rand() % 10;\n\nstptot=RandStp+10;\n\nif(debug==true){\n\ncout<<\"steps: \"<<RandStp<<endl;\n\ncout<<\"steps to another biome (if is 20 or 19 you enter into a new biome): \"<<stptot<<endl;\n\ncout<<\"RandDis: \"<<RandDis<<endl;\n\n}\n\nif(stptot==19)stptot=stptot+1;\n\nif(stptot==20){\n\nRandBiomes = rand() % biomesnum;\n\nplayer.biome=biomes\\[RandBiomes\\];\n\ncout<<\"congratulation you enter into a new biome: \"<<player.biome<<endl;\n\n}\n\nif(RandStp==RandDis){\n\nint RandIndex = rand() % objsnum;\n\n//int RandIndexi = rand() % invnum;\n\nRandIndex = rand() % objsnum;\n\ncout << objs\\[RandIndex\\]<<endl;\n\nif(objs\\[RandIndex\\]==\"Tree\"){\n\ncout<<\"you found a tree!\"<<endl;\n\ncout<<\"do you want to harvest it and obtain a tree log?\"<<endl;\n\ncin>>y;\n\nif(y=='y')insinv(\"Log\",invnum);[//player.inv](//player.inv)\\[RandIndexi\\]=\"Log\";\n\n}\n\nif(objs\\[RandIndex\\]==\"Zombie\"){\n\nif(player.sword==\"bare-fists\"){\n\nplayer.hp=player.hp-zombie.mdmg;\n\ncout<<\"you punch the zombie in the face, but is not enough to stop it\"<<endl;\n\ncout<<\"The zombie hit you\"<<endl;\n\ncout<<\"now you have \"<<player.hp<<\" health points\"<<endl;\n\n}else cout<<\"your mighty \"<<player.sword<<\" kill the zombie\"<<endl;\n\n}\n\nif(objs\\[RandIndex\\]==\"Creeper\"){\n\n//cout<<\"you have ten seconds to type 'w' to escape the creeper explosion\"<<endl;\n\n//cout<<\"due to a stupid bug the creeper is temporany disabled\"<<endl;\n\nif(player.sword==\"bare-fists\"){\n\nplayer.hp=player.hp-creeper.mdmg;\n\ncout<<\"your fists are not enough powerfull to kill the creeper\"<<endl;\n\ncout<<\"The creeper explode in front of you\"<<endl;\n\ncout<<\"now you have \"<<player.hp<<\" health points\"<<endl;\n\n}else cout<<\"you kill the creeper\"<<endl;\n\n}\n\nif(objs\\[RandIndex\\]==\"Cow\"){\n\nRandDrop;\n\ncout<<\"do you want to kill the cow to obtain one leather pice?\\\\nand also you might obatain a raw beef piece?\"<<endl;\n\ncin>>y;\n\nif(RandDrop==5){\n\ncout<<\"you obtain a raw beef piece\"<<endl;\n\ninsinv(\"Raw-Beef\",invnum);\n\n}\n\nif(y=='y')insinv(\"Leather\",invnum);[//player.inv](//player.inv)\\[RandIndexi\\]=\"Leather\";\n\n}\n\nif(player.biome!=\"Desert\"){\n\nif(objs\\[RandIndex\\]==\"Water\"){\n\ncout<<\"you found a water pond\"<<endl;\n\n}\n\n}else cout<<\"there is no water here\"<<endl;\n\n}\n\n}\n\nbreak;\n\n}\n\ncase 2:{\n\nwhile(true){\n\n//player invemtory//\n\ncout<<\"Player health points: \"<<player.hp<<endl;\n\ncout<<\"PLayer damage points: \"<<player.dmg<<endl;\n\ncout<<\"Player inventory \"<<endl;\n\nfor (int i=0; i<invnum; i++)\n\ncout << player.inv\\[i\\]<<endl;\n\ncout<<\"Player armor points: \"<<player.armor<<endl;\n\ncout<<\"Player armor\"<<endl;\n\nfor (int i=0; i<4; i++)\n\ncout << player.arms\\[i\\]<<\",\";\n\n//cout<<player.arms\\[0\\]<<\",\"<<player.arms\\[1\\]<<\",\"<<player.arms\\[2\\]<<\",\"<<player.arms\\[3\\]<<\",\"<<player.arms\\[4\\]<<endl;\n\ncout<<\"inventory managment:\\\\n'e' allows you to eat and regain health\\\\ntype 'c' to exit\"<<endl;\n\ncin>>action;\n\nif(action=='e'){\n\ncin>>invsl;\n\nif(player.inv\\[invsl\\]==\"Raw-Beef\"){\n\nplayer.inv\\[invsl\\]=\"air\";\n\nif(player.hp<20){\n\nplayer.hp=player.hp+5;\n\ncout<<\"you eat the \"<<player.inv\\[invsl\\]<<\"pice and you regeberate 5 hp\"<<endl;\n\n}\n\nif(player.hp==20)cout<<\"no need to eat your health is full\"<<endl;\n\n}else cout<<\"you can not eat \"<< player.inv\\[invsl\\]<<endl;\n\n}\n\nif(action=='c')break;\n\n}\n\nbreak;\n\n}\n\ncase 3:{\n\ncout<<\"crafting table:\"<<endl;\n\ncout <<setw(3)<<crftb\\[0\\]<<\",\"<<setw(3)<<crftb\\[1\\]<<\",\"<<setw(3)<<crftb\\[2\\]<<endl;\n\ncout <<setw(3)<<crftb\\[3\\]<<\",\"<<setw(3)<<crftb\\[4\\]<<\",\"<<setw(3)<<crftb\\[5\\]<<endl;\n\ncout <<setw(3)<<crftb\\[6\\]<<\",\"<<setw(3)<<crftb\\[7\\]<<\",\"<<setw(3)<<crftb\\[8\\]<<endl;\n\ncout<<\"to insert items into the crafting table\\\\nyou need to type the 'i' followed by the inventory slot (remeber slot ranged from 0 to 8)\\\\n followed by the crafting table (that also range from 0 to 8)  \"<<endl;\n\ncin>>actin>>invsl>>crfsl;\n\nif(actin=='i'){\n\ncrftb\\[crfsl\\]=player.inv\\[invsl\\];\n\nplayer.inv\\[invsl\\]=\"air\";\n\n}\n\nif(actin=='c')break;\n\ncout<<\"crafting table:\"<<endl;\n\n//for (int i = 9 - 1; i >= 0; i--)\n\ncout <<setw(3)<<crftb\\[0\\]<<\",\"<<setw(3)<<crftb\\[1\\]<<\",\"<<setw(3)<<crftb\\[2\\]<<endl;\n\ncout <<setw(3)<<crftb\\[3\\]<<\",\"<<setw(3)<<crftb\\[4\\]<<\",\"<<setw(3)<<crftb\\[5\\]<<endl;\n\ncout <<setw(3)<<crftb\\[6\\]<<\",\"<<setw(3)<<crftb\\[7\\]<<\",\"<<setw(3)<<crftb\\[8\\]<<endl;\n\nfor(int i=0; i<9; i++){\n\nif(crftb\\[i\\]==\"Log\"){\n\ninsinv(\"Planks\",invnum);\n\ncout<<\"crafted planks\"<<endl;\n\n}\n\nif((crftb\\[i\\]==\"Planks\")&&(crftb\\[i\\]==\"Planks\")&&(crftb\\[i\\]==\"Planks\")){\n\ninsinv(\"Wooden-sword\",invnum); //temporaney i want a shaped crafting for sword\n\nplayer.sword==\"Wooden-sword\";\n\n}\n\n}\n\nbreak;\n\n}\n\ncase 4:{\n\ncout<<\"type 's' to save or 'l' to load\\\\n ATTENTION this feature is under developmnet, for now only the inventory will get saved\"<<endl;\n\ncin>>action;\n\nif(action=='s')savload(1);\n\nif(action=='l')savload(2);\n\n}\n\ncase 5:{\n\nifstream testread(\"mine-save.bin\");\n\nFILE \\* pFile;\n\nstring output;\n\nint z;\n\nint sizestr=sizeof(struct plys);\n\nint sizeinv=sizeof(player.inv\\[invnum\\]);[//player.inv](//player.inv)\\[invnum\\].size();\n\nint sizearmor=sizeof(player.arms\\[4\\]);[//player.arms](//player.arms)\\[4\\].size();\n\nint sizsinv=player.inv\\[invnum\\].size();\n\nint sizsarm=player.arms\\[4\\].size();\n\nint leninv=player.inv\\[invnum\\].length();\n\nint lenarm=player.arms\\[4\\].length();\n\nint aligstr=alignof(struct plys);\n\nint aliginv=alignof(player.inv\\[invnum\\]);\n\nint aligarm=alignof(player.arms\\[4\\]);\n\nint sizsword=player.sword.size();\n\nint sizbiome=player.biome.size();\n\nint sizhp=sizeof(player.hp);\n\nfor(int i=0;i>4;i++)buffarmor\\[i\\]=\"air\";\n\nif(debug==true){\n\ncout<<\"debug menu:\\\\n\\[1\\]remove ten health points\\\\n\\[2\\]size of the struct and arrays in it with their alignment\\\\n\\[3\\]give you a bunch of stuff\\\\n\\[4\\]clear your inventory\\\\n\\[5\\]save inventory (and extra junk) to a binary file\\\\n\\[6\\]dump the save file into the console\\\\n\\[7\\]memcpy save test\"<<endl;\n\ncout<<\"Please don't use \\[5\\] or \\[7\\] options\"<<endl;\n\ncin>>z;\n\nif(z==3){\n\ninsinv(\"Planks\",invnum);\n\ninsinv(\"Planks\",invnum);\n\ninsinv(\"Planks\",invnum);\n\ninsinv(\"Raw-Beef\",invnum);\n\ninsinv(\"Log\",invnum);\n\n}\n\nif(z==1)player.hp=player.hp-10;\n\nif(z==2){\n\ncout<<\"size of player struct: \"<<sizestr<<endl;\n\ncout<<\"size of player inventory: \"<<sizeinv<<endl;\n\ncout<<\"size of player armor: \"<<sizearmor<<endl;\n\ncout<<\"size (.size()) of inventory: \"<<sizsinv<<endl;\n\ncout<<\"size (.length()) of inventory: \"<<leninv<<endl;\n\ncout<<\"size (.size()) of armor: \"<<sizsarm<<endl;\n\ncout<<\"size (.length()) of armor: \"<<lenarm<<endl;\n\ncout<<\"alignamanet of player struct: \"<<aligstr<<endl;\n\ncout<<\"alignamanet of inventory: \"<<aliginv<<endl;\n\ncout<<\"alignment of armor: \"<<aligarm<<endl;\n\n//remainder//\n\n//the alignment is a divisor of it size\n\n}\n\nif(z==4){\n\nfor(int i=0; i<invnum; i++)\n\nplayer.inv\\[i\\]=\"air\";\n\n}\n\nif(z==5){\n\n//Save to binary using copy//\n\n//FILE \\* pFile;\n\n//char buffer\\[\\] = { 't' , 'e' , 's' , 't' };\n\ncopy(begin(player.inv), end(player.inv), begin(buffinv));\n\n//copy(begin(player.arms), end(player.arms), begin(buffarmor));\n\npFile = fopen (\"mine-save-c.bin\", \"wb\");\n\nfwrite (buffinv , sizeof(string), sizeof(buffinv), pFile);\n\n//fwrite (buffarmor , sizeof(string), sizeof(buffarmor), pFile);\n\nfclose (pFile);\n\n}\n\nif(z==6){\n\n//print save file in the terminal//\n\nstring out;\n\nwhile (getline (testread,out)) {\n\ncout << out;\n\n}\n\ntestread.close();\n\n}\n\nif(z==7){\n\n//Save to binary using memcpy//\n\nmemcpy(buffinv,player.inv,sizeinv);\n\nmemcpy(buffarmor,player.arms,sizearmor);\n\npFile = fopen (\"mine-save.bin\", \"wb\");\n\nfwrite (buffinv , sizeof(string), sizeof(buffinv), pFile);\n\n//fwrite (buffarmor , sizeof(string), sizeof(buffarmor), pFile);\n\nfclose (pFile);\n\n}\n\nif(z==8){\n\n;\n\n}\n\n}else cout<<\"enable debug to acess it\"<<endl;\n\nbreak;\n\n}\n\n}\n\n}\n\n}\n\nint main(){\n\nint sel;\n\ncout<<\"Welcome to Mattia's Software minetext\"<<endl;\n\nwhile(true){\n\ncout<<\"--Minetext--\\\\n\\[1\\] Singleplayer\\\\n\\[2\\] Credits\\\\n\\[3\\] Comands list\"<<endl;\n\ncin>>sel;\n\nswitch(sel){\n\ncase 1:\n\n{\n\ngame();\n\nbreak;\n\n}\n\ncase 2:\n\n{\n\ncout<<\"Author: Mattia's Software\\\\n Based upon Minecraft\"<<endl;\n\ncout<<\"Thanks to Loxo, that help me with some stuffs\"<<endl;\n\nbreak;\n\n}\n\ncase 3:\n\n{\n\ncout<<\"List of useful comands:\\\\n'w': allows you to walk a random number of steps\\\\n'm':allows you to return to the main menu\\\\n'e':allows you to eat and regain health\\\\n to use it you need to type 'e' and then the inventory slot were the food is contained\\\\n you can type those comands when you choose the walk option during the game\"<<endl;\n\nbreak;\n\n}\n\n}\n\n}\n\n}\n\nPlease ignore the case 5 inside the switch(act) in void game().\n\nI tried to implement a save and load system inside the savload(int type) function, i was tryng to write the player inventory (player.inv\\[invnum\\]) that is inside of a struct called plys into a binary file called mine-save.bin . I tried to directly save data from player.inv array, but it did not worked, so i tried to copy player.inv into an array called buffinv, first with copy and then with memcpy, but that did not work either.\n\nnote that writing the player.arms array in to the save file will fill it up with junk data.\n\n\nAnd also I want to point out that I am a hobbyist, i program for fun, and as a challenge I tried to do Minecraft as a text based game", "comment": "1. Please format your code.\n1. Dont use `FILE*`. You are writing C++. Use `ofstream`\n1. It *appears* that you are \n 1. `memcpy`ing objects that most likely are not memcpy-able. Dont ever use `memcpy` unless you are really 110% sure you know what you are doing and that its a good idea.\n 1. Trying to write strings into a file by writing the bits of the string object. That does not work. A string stores its text outside of itself, you can access those bytes via `.c_str()`.", "upvote_ratio": 50.0, "sub": "cpp_questions"}854{"thread_id": "uo3quw", "question": "//--TO DO--//\n\n//add biome system |Check|\n\n//add per biome mob and structure system |Alted due to minor priority|\n\n//add format to cout for inventory and armor |Check|\n\n//upgrade damage and armor system\n\n//add objects quantity\n\n//add a save and load system |Not working|\n\n//add crafting system |Make a true shaped crafing system|\n\n//add a a inventory managment system\n\n//--TO FIX--//\n\n//|Check| When you encounter a creeper and after you walk you will die for no reason {\n\n//Possible cause: probably the program subtract 10 hp twice instead it should remove 10 hp per creeper encounter\n\n//Possible fix: fix Mattia's brain}\n\n//|Check| Trying to use for loop to detect with item is inserted into the crafting table {\n\n//Result: program crashed\n\n//Possible fix: learn how to use for loop or contact loxo}\n\n//Mattia's knowledge of C++ {\n\n//Possible cause: Mattia's bad knowledge about C++\n\n//Possible fix: Read a book}\n\n//When you save the armor array, you are also saving junk{\n\n//Result: garbage data into the save file\n\n//Possible fix: (bad idea) dissect and save single array elemnt or wait to put element int it before saving}\n\n\\#include <iostream>\n\n\\#include <string.h>\n\n\\#include <iomanip>\n\n\\#include <time.h>\n\n\\#include <fstream>\n\n\\#define objsnum 6\n\n\\#define invnum 9\n\n\\#define biomesnum 6\n\nusing namespace std;\n\n//#pragma pack(4)\n\nstruct plys{\n\nint hp;\n\nint exp;\n\nstring inv\\[invnum\\]={\"air\",\"air\",\"air\",\"air\",\"air\",\"air\",\"air\",\"air\",\"air\"};\n\nstring arms\\[4\\]={\"slot1\",\"slot2\",\"slot3\",\"slot4\"};\n\nint armor;\n\nint dmg;\n\nstring biome;\n\nstring sword;\n\n}player;\n\nstruct mobs{\n\nint mdmg;\n\nint resis;\n\n}creeper,zombie,husk;\n\n//insert into inventory//\n\nvoid insinv(string item, int len){\n\nfor(int i=0; i<len; i++){\n\nif(player.inv\\[i\\]==\"air\"){\n\nplayer.inv\\[i\\]=item;\n\nbreak;\n\n}\n\n}\n\n}\n\nvoid savload(int type){\n\nstring buffinv\\[invnum\\];\n\nifstream testread(\"mine-save.bin\");\n\nFILE \\* pFile;\n\nstring output;\n\nint sizestr=sizeof(struct plys);\n\nint sizeinv=sizeof(player.inv\\[invnum\\]);[//player.inv](//player.inv)\\[invnum\\].size();\n\nint sizearmor=sizeof(player.arms\\[4\\]);[//player.arms](//player.arms)\\[4\\].size();\n\nint sizsinv=player.inv\\[invnum\\].size();\n\nint sizsarm=player.arms\\[4\\].size();\n\nint leninv=player.inv\\[invnum\\].length();\n\nint lenarm=player.arms\\[4\\].length();\n\nint aligstr=alignof(struct plys);\n\nint aliginv=alignof(player.inv\\[invnum\\]);\n\nint aligarm=alignof(player.arms\\[4\\]);\n\nint sizsword=player.sword.size();\n\nint sizbiome=player.biome.size();\n\nint sizhp=sizeof(player.hp);\n\nif(type==1){\n\n//for(int i; i>invnum; i++)buffinv\\[i\\]=\"air\";\n\n//memcpy(buffinv,player.inv,invnum);\n\ncopy(begin(player.inv), end(player.inv), begin(buffinv));\n\npFile = fopen (\"mine-save.bin\", \"wb\");\n\nfwrite (buffinv , sizeof(string), buffinv\\[invnum\\].size(), pFile);\n\nfclose (pFile);\n\ncout<<\"invetory saved (hopefully, i don't know how to make an actual check)\"<<endl;\n\nreturn;\n\n}\n\nif(type==2){\n\nfor(int i; i>invnum; i++)buffinv\\[i\\]=\"air\";\n\ntestread.seekg (0, testread.beg);\n\nwhile (getline (testread,output)) {\n\nfor(int i; i>invnum;i++)\n\nbuffinv\\[i\\]=output;\n\n}\n\ntestread.close();\n\n//copy(begin(buffinv),end(buffinv),begin(player.inv));\n\nmemcpy(player.inv,buffinv,invnum);\n\ncout<<\"loaded (hopefully, i don't know how to make an actual check)\"<<endl;\n\nreturn;\n\n}\n\n}\n\n//game function//\n\nvoid game(){\n\nsrand ( time(NULL) );\n\n//player varibale//\n\nplayer.hp=20;\n\nplayer.exp=0;\n\nplayer.dmg=1;\n\n//mobs damages//\n\nint dmgt=0;\n\n//Creeper\n\ncreeper.mdmg=10;\n\n//Zombie\n\nzombie.mdmg=2;\n\n//Husk\n\nhusk.mdmg=3;\n\n//variables//\n\nint stptot;\n\nint act;\n\nint invsl;\n\nint crfsl;\n\nbool debug=true;\n\nchar y;\n\nchar action;\n\nchar actin;\n\nchar actcr;\n\n//armor types and protection values//\n\n//Leather\n\nint lhlpr=1; //helmet\n\nint lchpr=3; //chestplate\n\nint llgpr=2; //leggings\n\nint lbtpr=1; //boots\n\n//Iron\n\nint ihlpr=2; //helmet\n\nint ichpr=6; //chestplate\n\nint ilgpr=5; //leggings\n\nint ibtpr=4; //boots\n\nstring crftb\\[9\\]={\"slot0\",\"slot1\",\"slot2\",\"slot3\",\"slot4\",\"slot5\",\"slot6\",\"slot7\",\"slot8\"};\n\nstring objs\\[objsnum\\]={\"Tree\",\"Creeper\",\"Cow\",\"Water\",\"Zombie\",\"Lava\"};\n\n//string \\*pobjs =objs;\n\nstring biomes\\[biomesnum\\]={\"Plains\",\"Desert\",\"Forest\",\"Hills\",\"Ice-Peeks\",\"Dark-Forest\"};\n\nstring buffinv\\[invnum\\];\n\nstring buffarmor\\[4\\];\n\nstring loadinv\\[invnum\\];\n\n//cout<<\"tutorial: to play type a number of steps\\\\n every ten steps you may find something\"<<endl;\n\n//armor calculator//\n\nif(player.arms\\[0\\]==\"air\")player.armor=player.armor+0;\n\nif(player.arms\\[1\\]==\"air\")player.armor=player.armor+0;\n\nif(player.arms\\[2\\]==\"air\")player.armor=player.armor+0;\n\nif(player.arms\\[3\\]==\"air\")player.armor=player.armor+0;\n\n//leather//\n\nif(player.arms\\[0\\]==\"let\\_helmet\")player.armor=player.armor+lhlpr;\n\nif(player.arms\\[1\\]==\"let\\_leggings\")player.armor=player.armor+lchpr;\n\nif(player.arms\\[2\\]==\"let\\_chestplate\")player.armor=player.armor+llgpr;\n\nif(player.arms\\[3\\]==\"let\\_boots\")player.armor=player.armor+lbtpr;\n\nwhile(true){\n\nsrand ( time(NULL) );\n\nif(debug==true)cout << \"\\\\033\\[1;31mATTENTION\\\\033\\[0m\\\\ndebug menu enabled\\\\ntype 5 to access it\"<<endl;\n\ncout<<\"type:\\\\n\\[1\\] Walk\\\\n\\[2\\] Browse and manage the invetory\\\\n\\[3\\] Crafting table\\\\n\\[4\\]Save or load (only player invemtory for now)\"<<endl;\n\ncin>>act;\n\nswitch(act){\n\ncase 1:{\n\n//core gameplay loop//\n\nint RandDis = rand() % 10;\n\nint RandBiomes = rand() % biomesnum;\n\nint RandDrop = rand() % 5;\n\nif(player.sword.empty())player.sword=\"bare-fists\";\n\nif(player.biome.empty()){\n\nRandBiomes = rand() % biomesnum;\n\nplayer.biome=biomes\\[RandBiomes\\];\n\n}\n\ncout<<\"type 'w' to walk and you may find something\"<<endl;\n\ncout<<\"current biome: \"<<player.biome<<endl;\n\ncout<<\"your current sword: \"<<player.sword<<endl;\n\ncin>>action;\n\nif(action=='m')return;\n\nif(player.hp<=0){\n\ncout<<\"you died!\"<<endl;\n\nexit(EXIT\\_SUCCESS);\n\n}\n\nif(action=='w'){\n\nint RandStp = rand() % 10;\n\nRandStp = rand() % 10;\n\nstptot=RandStp+10;\n\nif(debug==true){\n\ncout<<\"steps: \"<<RandStp<<endl;\n\ncout<<\"steps to another biome (if is 20 or 19 you enter into a new biome): \"<<stptot<<endl;\n\ncout<<\"RandDis: \"<<RandDis<<endl;\n\n}\n\nif(stptot==19)stptot=stptot+1;\n\nif(stptot==20){\n\nRandBiomes = rand() % biomesnum;\n\nplayer.biome=biomes\\[RandBiomes\\];\n\ncout<<\"congratulation you enter into a new biome: \"<<player.biome<<endl;\n\n}\n\nif(RandStp==RandDis){\n\nint RandIndex = rand() % objsnum;\n\n//int RandIndexi = rand() % invnum;\n\nRandIndex = rand() % objsnum;\n\ncout << objs\\[RandIndex\\]<<endl;\n\nif(objs\\[RandIndex\\]==\"Tree\"){\n\ncout<<\"you found a tree!\"<<endl;\n\ncout<<\"do you want to harvest it and obtain a tree log?\"<<endl;\n\ncin>>y;\n\nif(y=='y')insinv(\"Log\",invnum);[//player.inv](//player.inv)\\[RandIndexi\\]=\"Log\";\n\n}\n\nif(objs\\[RandIndex\\]==\"Zombie\"){\n\nif(player.sword==\"bare-fists\"){\n\nplayer.hp=player.hp-zombie.mdmg;\n\ncout<<\"you punch the zombie in the face, but is not enough to stop it\"<<endl;\n\ncout<<\"The zombie hit you\"<<endl;\n\ncout<<\"now you have \"<<player.hp<<\" health points\"<<endl;\n\n}else cout<<\"your mighty \"<<player.sword<<\" kill the zombie\"<<endl;\n\n}\n\nif(objs\\[RandIndex\\]==\"Creeper\"){\n\n//cout<<\"you have ten seconds to type 'w' to escape the creeper explosion\"<<endl;\n\n//cout<<\"due to a stupid bug the creeper is temporany disabled\"<<endl;\n\nif(player.sword==\"bare-fists\"){\n\nplayer.hp=player.hp-creeper.mdmg;\n\ncout<<\"your fists are not enough powerfull to kill the creeper\"<<endl;\n\ncout<<\"The creeper explode in front of you\"<<endl;\n\ncout<<\"now you have \"<<player.hp<<\" health points\"<<endl;\n\n}else cout<<\"you kill the creeper\"<<endl;\n\n}\n\nif(objs\\[RandIndex\\]==\"Cow\"){\n\nRandDrop;\n\ncout<<\"do you want to kill the cow to obtain one leather pice?\\\\nand also you might obatain a raw beef piece?\"<<endl;\n\ncin>>y;\n\nif(RandDrop==5){\n\ncout<<\"you obtain a raw beef piece\"<<endl;\n\ninsinv(\"Raw-Beef\",invnum);\n\n}\n\nif(y=='y')insinv(\"Leather\",invnum);[//player.inv](//player.inv)\\[RandIndexi\\]=\"Leather\";\n\n}\n\nif(player.biome!=\"Desert\"){\n\nif(objs\\[RandIndex\\]==\"Water\"){\n\ncout<<\"you found a water pond\"<<endl;\n\n}\n\n}else cout<<\"there is no water here\"<<endl;\n\n}\n\n}\n\nbreak;\n\n}\n\ncase 2:{\n\nwhile(true){\n\n//player invemtory//\n\ncout<<\"Player health points: \"<<player.hp<<endl;\n\ncout<<\"PLayer damage points: \"<<player.dmg<<endl;\n\ncout<<\"Player inventory \"<<endl;\n\nfor (int i=0; i<invnum; i++)\n\ncout << player.inv\\[i\\]<<endl;\n\ncout<<\"Player armor points: \"<<player.armor<<endl;\n\ncout<<\"Player armor\"<<endl;\n\nfor (int i=0; i<4; i++)\n\ncout << player.arms\\[i\\]<<\",\";\n\n//cout<<player.arms\\[0\\]<<\",\"<<player.arms\\[1\\]<<\",\"<<player.arms\\[2\\]<<\",\"<<player.arms\\[3\\]<<\",\"<<player.arms\\[4\\]<<endl;\n\ncout<<\"inventory managment:\\\\n'e' allows you to eat and regain health\\\\ntype 'c' to exit\"<<endl;\n\ncin>>action;\n\nif(action=='e'){\n\ncin>>invsl;\n\nif(player.inv\\[invsl\\]==\"Raw-Beef\"){\n\nplayer.inv\\[invsl\\]=\"air\";\n\nif(player.hp<20){\n\nplayer.hp=player.hp+5;\n\ncout<<\"you eat the \"<<player.inv\\[invsl\\]<<\"pice and you regeberate 5 hp\"<<endl;\n\n}\n\nif(player.hp==20)cout<<\"no need to eat your health is full\"<<endl;\n\n}else cout<<\"you can not eat \"<< player.inv\\[invsl\\]<<endl;\n\n}\n\nif(action=='c')break;\n\n}\n\nbreak;\n\n}\n\ncase 3:{\n\ncout<<\"crafting table:\"<<endl;\n\ncout <<setw(3)<<crftb\\[0\\]<<\",\"<<setw(3)<<crftb\\[1\\]<<\",\"<<setw(3)<<crftb\\[2\\]<<endl;\n\ncout <<setw(3)<<crftb\\[3\\]<<\",\"<<setw(3)<<crftb\\[4\\]<<\",\"<<setw(3)<<crftb\\[5\\]<<endl;\n\ncout <<setw(3)<<crftb\\[6\\]<<\",\"<<setw(3)<<crftb\\[7\\]<<\",\"<<setw(3)<<crftb\\[8\\]<<endl;\n\ncout<<\"to insert items into the crafting table\\\\nyou need to type the 'i' followed by the inventory slot (remeber slot ranged from 0 to 8)\\\\n followed by the crafting table (that also range from 0 to 8)  \"<<endl;\n\ncin>>actin>>invsl>>crfsl;\n\nif(actin=='i'){\n\ncrftb\\[crfsl\\]=player.inv\\[invsl\\];\n\nplayer.inv\\[invsl\\]=\"air\";\n\n}\n\nif(actin=='c')break;\n\ncout<<\"crafting table:\"<<endl;\n\n//for (int i = 9 - 1; i >= 0; i--)\n\ncout <<setw(3)<<crftb\\[0\\]<<\",\"<<setw(3)<<crftb\\[1\\]<<\",\"<<setw(3)<<crftb\\[2\\]<<endl;\n\ncout <<setw(3)<<crftb\\[3\\]<<\",\"<<setw(3)<<crftb\\[4\\]<<\",\"<<setw(3)<<crftb\\[5\\]<<endl;\n\ncout <<setw(3)<<crftb\\[6\\]<<\",\"<<setw(3)<<crftb\\[7\\]<<\",\"<<setw(3)<<crftb\\[8\\]<<endl;\n\nfor(int i=0; i<9; i++){\n\nif(crftb\\[i\\]==\"Log\"){\n\ninsinv(\"Planks\",invnum);\n\ncout<<\"crafted planks\"<<endl;\n\n}\n\nif((crftb\\[i\\]==\"Planks\")&&(crftb\\[i\\]==\"Planks\")&&(crftb\\[i\\]==\"Planks\")){\n\ninsinv(\"Wooden-sword\",invnum); //temporaney i want a shaped crafting for sword\n\nplayer.sword==\"Wooden-sword\";\n\n}\n\n}\n\nbreak;\n\n}\n\ncase 4:{\n\ncout<<\"type 's' to save or 'l' to load\\\\n ATTENTION this feature is under developmnet, for now only the inventory will get saved\"<<endl;\n\ncin>>action;\n\nif(action=='s')savload(1);\n\nif(action=='l')savload(2);\n\n}\n\ncase 5:{\n\nifstream testread(\"mine-save.bin\");\n\nFILE \\* pFile;\n\nstring output;\n\nint z;\n\nint sizestr=sizeof(struct plys);\n\nint sizeinv=sizeof(player.inv\\[invnum\\]);[//player.inv](//player.inv)\\[invnum\\].size();\n\nint sizearmor=sizeof(player.arms\\[4\\]);[//player.arms](//player.arms)\\[4\\].size();\n\nint sizsinv=player.inv\\[invnum\\].size();\n\nint sizsarm=player.arms\\[4\\].size();\n\nint leninv=player.inv\\[invnum\\].length();\n\nint lenarm=player.arms\\[4\\].length();\n\nint aligstr=alignof(struct plys);\n\nint aliginv=alignof(player.inv\\[invnum\\]);\n\nint aligarm=alignof(player.arms\\[4\\]);\n\nint sizsword=player.sword.size();\n\nint sizbiome=player.biome.size();\n\nint sizhp=sizeof(player.hp);\n\nfor(int i=0;i>4;i++)buffarmor\\[i\\]=\"air\";\n\nif(debug==true){\n\ncout<<\"debug menu:\\\\n\\[1\\]remove ten health points\\\\n\\[2\\]size of the struct and arrays in it with their alignment\\\\n\\[3\\]give you a bunch of stuff\\\\n\\[4\\]clear your inventory\\\\n\\[5\\]save inventory (and extra junk) to a binary file\\\\n\\[6\\]dump the save file into the console\\\\n\\[7\\]memcpy save test\"<<endl;\n\ncout<<\"Please don't use \\[5\\] or \\[7\\] options\"<<endl;\n\ncin>>z;\n\nif(z==3){\n\ninsinv(\"Planks\",invnum);\n\ninsinv(\"Planks\",invnum);\n\ninsinv(\"Planks\",invnum);\n\ninsinv(\"Raw-Beef\",invnum);\n\ninsinv(\"Log\",invnum);\n\n}\n\nif(z==1)player.hp=player.hp-10;\n\nif(z==2){\n\ncout<<\"size of player struct: \"<<sizestr<<endl;\n\ncout<<\"size of player inventory: \"<<sizeinv<<endl;\n\ncout<<\"size of player armor: \"<<sizearmor<<endl;\n\ncout<<\"size (.size()) of inventory: \"<<sizsinv<<endl;\n\ncout<<\"size (.length()) of inventory: \"<<leninv<<endl;\n\ncout<<\"size (.size()) of armor: \"<<sizsarm<<endl;\n\ncout<<\"size (.length()) of armor: \"<<lenarm<<endl;\n\ncout<<\"alignamanet of player struct: \"<<aligstr<<endl;\n\ncout<<\"alignamanet of inventory: \"<<aliginv<<endl;\n\ncout<<\"alignment of armor: \"<<aligarm<<endl;\n\n//remainder//\n\n//the alignment is a divisor of it size\n\n}\n\nif(z==4){\n\nfor(int i=0; i<invnum; i++)\n\nplayer.inv\\[i\\]=\"air\";\n\n}\n\nif(z==5){\n\n//Save to binary using copy//\n\n//FILE \\* pFile;\n\n//char buffer\\[\\] = { 't' , 'e' , 's' , 't' };\n\ncopy(begin(player.inv), end(player.inv), begin(buffinv));\n\n//copy(begin(player.arms), end(player.arms), begin(buffarmor));\n\npFile = fopen (\"mine-save-c.bin\", \"wb\");\n\nfwrite (buffinv , sizeof(string), sizeof(buffinv), pFile);\n\n//fwrite (buffarmor , sizeof(string), sizeof(buffarmor), pFile);\n\nfclose (pFile);\n\n}\n\nif(z==6){\n\n//print save file in the terminal//\n\nstring out;\n\nwhile (getline (testread,out)) {\n\ncout << out;\n\n}\n\ntestread.close();\n\n}\n\nif(z==7){\n\n//Save to binary using memcpy//\n\nmemcpy(buffinv,player.inv,sizeinv);\n\nmemcpy(buffarmor,player.arms,sizearmor);\n\npFile = fopen (\"mine-save.bin\", \"wb\");\n\nfwrite (buffinv , sizeof(string), sizeof(buffinv), pFile);\n\n//fwrite (buffarmor , sizeof(string), sizeof(buffarmor), pFile);\n\nfclose (pFile);\n\n}\n\nif(z==8){\n\n;\n\n}\n\n}else cout<<\"enable debug to acess it\"<<endl;\n\nbreak;\n\n}\n\n}\n\n}\n\n}\n\nint main(){\n\nint sel;\n\ncout<<\"Welcome to Mattia's Software minetext\"<<endl;\n\nwhile(true){\n\ncout<<\"--Minetext--\\\\n\\[1\\] Singleplayer\\\\n\\[2\\] Credits\\\\n\\[3\\] Comands list\"<<endl;\n\ncin>>sel;\n\nswitch(sel){\n\ncase 1:\n\n{\n\ngame();\n\nbreak;\n\n}\n\ncase 2:\n\n{\n\ncout<<\"Author: Mattia's Software\\\\n Based upon Minecraft\"<<endl;\n\ncout<<\"Thanks to Loxo, that help me with some stuffs\"<<endl;\n\nbreak;\n\n}\n\ncase 3:\n\n{\n\ncout<<\"List of useful comands:\\\\n'w': allows you to walk a random number of steps\\\\n'm':allows you to return to the main menu\\\\n'e':allows you to eat and regain health\\\\n to use it you need to type 'e' and then the inventory slot were the food is contained\\\\n you can type those comands when you choose the walk option during the game\"<<endl;\n\nbreak;\n\n}\n\n}\n\n}\n\n}\n\nPlease ignore the case 5 inside the switch(act) in void game().\n\nI tried to implement a save and load system inside the savload(int type) function, i was tryng to write the player inventory (player.inv\\[invnum\\]) that is inside of a struct called plys into a binary file called mine-save.bin . I tried to directly save data from player.inv array, but it did not worked, so i tried to copy player.inv into an array called buffinv, first with copy and then with memcpy, but that did not work either.\n\nnote that writing the player.arms array in to the save file will fill it up with junk data.\n\n\nAnd also I want to point out that I am a hobbyist, i program for fun, and as a challenge I tried to do Minecraft as a text based game", "comment": "Your posts seem to contain unformatted code. Please make sure to format your code otherwise your post may be removed.\n\nRead [our guidelines](https://www.reddit.com/r/cpp_questions/comments/48d4pc/important_read_before_posting/) for how to format your code.\n\n\n*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/cpp_questions) if you have any questions or concerns.*", "upvote_ratio": 30.0, "sub": "cpp_questions"}855{"thread_id": "uo41zb", "question": "Especially on Reddit, India and Egypt (and sometimes Morocco) tend to be cited more often than other countries as being dangerous for women to travel in, even more so alone. However, a lot of people still express interest in then, despite the dangers, because of their history and culture. How would you personally feel if someone close to you was interested in traveling there?", "comment": "I\u2019m an adult woman.  I can make my own decisions and go where I want.  We don\u2019t need to be chaperoned and we\u2019re not stupid.", "upvote_ratio": 470.0, "sub": "AskAnAmerican"}856{"thread_id": "uo41zb", "question": "Especially on Reddit, India and Egypt (and sometimes Morocco) tend to be cited more often than other countries as being dangerous for women to travel in, even more so alone. However, a lot of people still express interest in then, despite the dangers, because of their history and culture. How would you personally feel if someone close to you was interested in traveling there?", "comment": "I'd tell them to be careful. I would also say the same thing to a guy going abroad.", "upvote_ratio": 420.0, "sub": "AskAnAmerican"}857{"thread_id": "uo41zb", "question": "Especially on Reddit, India and Egypt (and sometimes Morocco) tend to be cited more often than other countries as being dangerous for women to travel in, even more so alone. However, a lot of people still express interest in then, despite the dangers, because of their history and culture. How would you personally feel if someone close to you was interested in traveling there?", "comment": "If any of my friends plans a trip like that, I\u2019d trust her to be smart enough to do her own research. She\u2019s an adult, she knows the risks. I\u2019m not her dad.", "upvote_ratio": 360.0, "sub": "AskAnAmerican"}858{"thread_id": "uo428d", "question": "I recently read Shelby Foote\u2019s Narrative of the Civil War. Something that stuck out to me was how even after the war, the southern leaders insisted that the South and North were separate nations bound together in the same country, like England and Scotland are separate nations in the UK. How prevalent is this thought today? Are we one nation, or multiple?", "comment": "One nation.\n\nThe similarities outweigh the differences by *far*.", "upvote_ratio": 1470.0, "sub": "AskAnAmerican"}859{"thread_id": "uo428d", "question": "I recently read Shelby Foote\u2019s Narrative of the Civil War. Something that stuck out to me was how even after the war, the southern leaders insisted that the South and North were separate nations bound together in the same country, like England and Scotland are separate nations in the UK. How prevalent is this thought today? Are we one nation, or multiple?", "comment": "Unless you're counting nations like the [Navajo Nation](https://www.navajo-nsn.gov/), no.\n\nWe were never multiple countries assembled into Voltron States of America.\n\nA group of seditionist traitors does not make us 2 nations.", "upvote_ratio": 920.0, "sub": "AskAnAmerican"}860{"thread_id": "uo428d", "question": "I recently read Shelby Foote\u2019s Narrative of the Civil War. Something that stuck out to me was how even after the war, the southern leaders insisted that the South and North were separate nations bound together in the same country, like England and Scotland are separate nations in the UK. How prevalent is this thought today? Are we one nation, or multiple?", "comment": "This is just a matter of semantics. Traditionally a \u201cnation\u201d was more or less synonymous with ethnicity, and a country was a legal authority that controlled a particular territory.\n\nSo, countries like Austria-Hungary were usually considered \u201cmulti-national states\u201d as they contained various distinct peoples.\n\nToday, nation and country have become synonymous in common parlance. So, in that sense the US is one nation. In the older sense, America is as far from being \u201cone nation\u201d as any country in human history lol.", "upvote_ratio": 770.0, "sub": "AskAnAmerican"}861{"thread_id": "uo44ud", "question": "I have an SM-T290 Samsung tablet, and I want to know if I can make it think it's a phone without flashing a new OS. If this is possible, please tell me.", "comment": "What exactly are you trying to accomplish?", "upvote_ratio": 80.0, "sub": "AndroidQuestions"}862{"thread_id": "uo4apa", "question": "Hello r/AskHistorians,\n\nI recently finished reading David Graeber and David Wengrow's Dawn of Everything. In the book, they make an interesting claim: that the European Enlightenment was, in many ways, started by Native American philosophers criticizing European customs. They bring up the example of Kondiaronk, a Native Chief, who conducted a series of interviews in which he laid out his view on white customs and society. This apparently was widely read in Europe and inspired people like Rousseau. He also brings up several passages written by European missionaries, in which Natives bring up points that seem eerily reminiscent of later Enlightenment thinkers.  This is an interesting take on the Enlightenment. How much weight does it hold? Also, could you recommend any further reading on this subject?", "comment": "I have been looking for more resources on Kandiaronk ever since I read it as well and what I've been left to grapple with are the critical reviews of Graber and Wengrow's second chapter, so that is what I'll share here. Said critiques rely heavily on assuming that Lahontan, the author of *The Dialogues*, the work that entails the conversations between Lahontan and Kandiaronk in which Kandiaronk lays out his criticism of European society, was the creator of the critiques of European society that Graeber and Wengrow ascribe to Kandiaronk. David Bell, an American historian who wrote [this](https://www.persuasion.community/p/a-flawed-history-of-humanity?s=r) critique of the chapter, claims that Lahontan used Kandiaronk as a literary device to carry his own critiques of European society, as many written philosophical works in Europe at the time were written as fictional stories and used a literary tradition Anthony Pagden calls the \u201csavage critic.\u201d Although there are cases of this type of writing being used, it is wildly ahistorical for Bell to assume Lahontan was engaging in this kind of writing. Why would Lahontan, a French soldier with no notoriety as an intellectual in Europe prior to the release of his *The Dialogues*, intentionally frame his own criticisms of Europe as that of a Native American? Even Bell acknowledges that in Lahontan's work, the fictional character Adairo, who frequently repels Lahontan's articulations of the superiority of Christianity and Europe, was most likely Kandiorank.  There is no evidence that supports the idea that Lahontan created a dialogue between him and someone who by even critiques accounts was loosely based on Kandiorank as his own besides thinking since other authors did, we can assume Lahontan did as well. The evidence for Adairo representing Kandiaronk is building, but not concrete either - take the work 'Native American Speakers of the Eastern Woodlands', by Barbara Alice Mann, which Bell even uses himself and attempts to dispute using the following logic- *Mann argued that the \u201cflat dismissal\u201d of the Dialogues as an authentic transcript of a Native American voice reflected racism and a \u201cwestern sneer.\u201d She argues that in fact a \u201cbeguiled Lahontan\u201d took elaborate notes as he conversed with Kandiaronk, and then later put them together into the Dialogues. But what is Mann\u2019s principal evidence? In her book, she triumphantly quotes Lahontan himself: \u201cWhen I was in the village of this \\[Native\\] American, I took on the agreeable task of carefully noting all his arguments. No sooner had I returned from my trip to the Canadian lakes than I showed my manuscript to Count Frontenac, who was so pleased to read it that he made the effort to help me put these Dialogues into their present state.\u201d The case seems irrefutable, except for one important point: These words come from the preface to the Dialogues themselves.*\n\nSo, Bell's critique of Mann's framing of *The Dialogues* relies upon the same guesswork he criticizes Graber and Wengrow of committing. The evidence suggests *The Dialogues* are a verbatim account of the debates between Kandiaronk and Lahontan. To act as if a colonial soldier looking to spread Christianity would come up with these critiques himself, after meeting with Kandiaronk, who we know was an incredible orator and brilliant statesman, (for more on him look [here](https://www.wyandot.org/intro.htm)) is a line of thought consistent with the Western chauvinism Graeber and Wengrow looked to dispel and it's emergence can be attributed to a reflex reaction from historians who have based their work off a certain story of European enlightenment. What The Dawn of Everything shows us is that the origin of enlightenment ideals are more murky than previously thought, and that we should continue to question the seemingly concrete ways we tell the story of our civilization and how it is set up.", "upvote_ratio": 2830.0, "sub": "AskHistorians"}863{"thread_id": "uo4apa", "question": "Hello r/AskHistorians,\n\nI recently finished reading David Graeber and David Wengrow's Dawn of Everything. In the book, they make an interesting claim: that the European Enlightenment was, in many ways, started by Native American philosophers criticizing European customs. They bring up the example of Kondiaronk, a Native Chief, who conducted a series of interviews in which he laid out his view on white customs and society. This apparently was widely read in Europe and inspired people like Rousseau. He also brings up several passages written by European missionaries, in which Natives bring up points that seem eerily reminiscent of later Enlightenment thinkers.  This is an interesting take on the Enlightenment. How much weight does it hold? Also, could you recommend any further reading on this subject?", "comment": "[removed]", "upvote_ratio": 670.0, "sub": "AskHistorians"}864{"thread_id": "uo4apa", "question": "Hello r/AskHistorians,\n\nI recently finished reading David Graeber and David Wengrow's Dawn of Everything. In the book, they make an interesting claim: that the European Enlightenment was, in many ways, started by Native American philosophers criticizing European customs. They bring up the example of Kondiaronk, a Native Chief, who conducted a series of interviews in which he laid out his view on white customs and society. This apparently was widely read in Europe and inspired people like Rousseau. He also brings up several passages written by European missionaries, in which Natives bring up points that seem eerily reminiscent of later Enlightenment thinkers.  This is an interesting take on the Enlightenment. How much weight does it hold? Also, could you recommend any further reading on this subject?", "comment": "[removed]", "upvote_ratio": 520.0, "sub": "AskHistorians"}865{"thread_id": "uo4ff5", "question": "I've been in restaurants since I could work and I'm looking to get into a help desk role. I've messed with home lab stuff on and off, but nothing to really add to my resume (basic active directory, setting up servers and VMs). \n\n​\n\nI just feel stuck on my resume and feel like I've looked at it so much it doesn't even look right anymore. can anyone point me in the correct direction?\n\n​\n\n[My Resume](https://ibb.co/zxknFXT)\n\nEdit: I realized I uploaded the wrong resume. I\u2019m at work and can\u2019t change it", "comment": "I also came from a restaurant industry and transitioned into IT. Your resume has a lot of restaurant bullet points -- which is irrelevant to IT. Recruiter's are not gonna read most of it. Change the first two bullets to something about customer service. That's a big overlapping skill. (for example: dealing with an irate customer and how you learned to deal with the situation).\n\nAlso, add more IT achievements. Feel free to add a new section \"current projects\" or something and talk about what you're currently doing to learn / practice IT. For example, a homelab or practicing on a VM. Mention *any* relative IT experience. Any school projects you did.\n\nIn the beginning, *any* experience holds a lot of weight.", "upvote_ratio": 110.0, "sub": "ITCareerQuestions"}866{"thread_id": "uo4ff5", "question": "I've been in restaurants since I could work and I'm looking to get into a help desk role. I've messed with home lab stuff on and off, but nothing to really add to my resume (basic active directory, setting up servers and VMs). \n\n​\n\nI just feel stuck on my resume and feel like I've looked at it so much it doesn't even look right anymore. can anyone point me in the correct direction?\n\n​\n\n[My Resume](https://ibb.co/zxknFXT)\n\nEdit: I realized I uploaded the wrong resume. I\u2019m at work and can\u2019t change it", "comment": "Get a free AWS or Azure cloud account - spend some time there.", "upvote_ratio": 50.0, "sub": "ITCareerQuestions"}867{"thread_id": "uo4ff5", "question": "I've been in restaurants since I could work and I'm looking to get into a help desk role. I've messed with home lab stuff on and off, but nothing to really add to my resume (basic active directory, setting up servers and VMs). \n\n​\n\nI just feel stuck on my resume and feel like I've looked at it so much it doesn't even look right anymore. can anyone point me in the correct direction?\n\n​\n\n[My Resume](https://ibb.co/zxknFXT)\n\nEdit: I realized I uploaded the wrong resume. I\u2019m at work and can\u2019t change it", "comment": "Incoming list of puns: \n\nExperience managing servers \n\nFamiliarity with embedded Linux systems (POS)\n\nDebugging \n\nExperience operating bare metal (knives, utensils)\n\n\nIn all seriousness though, you\u2019ve got this :)", "upvote_ratio": 40.0, "sub": "ITCareerQuestions"}868{"thread_id": "uo4sf1", "question": "I\u2019ll go first. \n\n\u201cOld people don\u2019t understand technology.\u201d Who do you think invented the technology? Plus, we\u2019ve been around this whole time, it\u2019s not like we time traveled from the past. *Some* old people may have trouble with *some* technology \u2014 but have you ever seen how nervous young people get about making an actual phone call?", "comment": "I'm tired of hearing how fucked they are, mostly because it's true, and I can't do anything about it. I want things to be better for them. I am so mad that they are paying impossible tuition rates to get degrees for shit jobs that don't pay well and then if they get sick, they might go bankrupt. \n\nI know a lot of young couples who look at having kids like a luxury item these days. \"Who can afford the daycare, formula, diapers, and losing time from work?  it's a full time job on top of my already full time job.  I am stressed out and don't need to come home to some screaming health risk that could lead to bankruptcy. I am depressed and anxious all the time. It's irresponsible to have kids. Besides, the population needs curbed anyway.\"\n\nI help where I can, but I can't help everyone.", "upvote_ratio": 1440.0, "sub": "AskOldPeople"}869{"thread_id": "uo4sf1", "question": "I\u2019ll go first. \n\n\u201cOld people don\u2019t understand technology.\u201d Who do you think invented the technology? Plus, we\u2019ve been around this whole time, it\u2019s not like we time traveled from the past. *Some* old people may have trouble with *some* technology \u2014 but have you ever seen how nervous young people get about making an actual phone call?", "comment": "When it comes to technology, fashion, trends, etc, a lot of people mistake a lack of interest for an inability to learn. \n\nI'm finding that retirement is the biggest hit to my interest level. I have no need to pay attention to the latest fashions if I'm not going to the office. I have no need to pay any attention to current music and celebrities so that I won't feel out of touch at the water cooler. \n\nAs far as technology is concerned, my needs are pretty simple. If anything, computing technology is far simpler than it used to be. I used to build PCs from parts, configure them in DOS, then load Windows and configure that, and finally load additional programs that my customers wanted. I wrote scripts and macros, and set up their programs as well. I taught myself DOS, C, HTML and PHP. Now what do people do? They download the app or program they want and usually the default settings are all they need. Nothing could be easier. If I'm not on Tik Tok, it's because I don't want to be!", "upvote_ratio": 1020.0, "sub": "AskOldPeople"}870{"thread_id": "uo4sf1", "question": "I\u2019ll go first. \n\n\u201cOld people don\u2019t understand technology.\u201d Who do you think invented the technology? Plus, we\u2019ve been around this whole time, it\u2019s not like we time traveled from the past. *Some* old people may have trouble with *some* technology \u2014 but have you ever seen how nervous young people get about making an actual phone call?", "comment": "\"Being a young person is SO much harder now than it used to be.\"\n\n​\n\nyes, young people today have some challenges we didn't have.   But we had many they don't. \n\n​\n\nTeens to 20s has never been an easy time of life for anyone!", "upvote_ratio": 940.0, "sub": "AskOldPeople"}871{"thread_id": "uo4tss", "question": "Is it safe to download dev c++ from sourceforge? https://sourceforge.net/projects/orwelldevcpp/", "comment": "Safe? Sure. That's an outdated version of that IDE though. A company called Embarcadero has been maintaining it for the past couple of years. I think the last Orwell release was from 2015.\n\nOn Windows, I'd typically go for Visual Studio. There's a Community Edition that's free.", "upvote_ratio": 30.0, "sub": "cpp_questions"}872{"thread_id": "uo4tss", "question": "Is it safe to download dev c++ from sourceforge? https://sourceforge.net/projects/orwelldevcpp/", "comment": "Just download [Visual Studio](https://visualstudio.microsoft.com/vs/community/) instead.", "upvote_ratio": 30.0, "sub": "cpp_questions"}873{"thread_id": "uo504c", "question": "I\u2019m 36 I\u2019ve worked my whole life in retail in different positions pretty much done it all. \nI work for verizon now, I don\u2019t have much any formal education just high school. I\u2019m some what ok with using a PC at work and just got a MacBook personally. \nI make about 80k with commissions and all. Money is decent but there is no growth and the way retail store closures are going I\u2019m pretty sure mine is on the chopping block too, I have excellent people skills and I\u2019m a fast learner. Someone recommended get an A+ to under the core and then see what\u2019s in demand as a certification. \nWhat would you guys recommend? Tia", "comment": "The only challenge I see here is you have no formal technical training or work history, and you are making 80k a year which is easily a mid level career in IT.  If you want to make a jump into IT, it is possible to do, but you will probably have to take a lower paying job and work your way up.\n\nAnother option you have, instead of looking at technical IT work, is to look at IT sales.  It sounds like you are already doing that at your retail job and you may be able to slide into a role like that.  You don't have to be overly technical to do that work, and you will have sales engineers you can lean on for heavy technical stuff.", "upvote_ratio": 40.0, "sub": "ITCareerQuestions"}874{"thread_id": "uo504c", "question": "I\u2019m 36 I\u2019ve worked my whole life in retail in different positions pretty much done it all. \nI work for verizon now, I don\u2019t have much any formal education just high school. I\u2019m some what ok with using a PC at work and just got a MacBook personally. \nI make about 80k with commissions and all. Money is decent but there is no growth and the way retail store closures are going I\u2019m pretty sure mine is on the chopping block too, I have excellent people skills and I\u2019m a fast learner. Someone recommended get an A+ to under the core and then see what\u2019s in demand as a certification. \nWhat would you guys recommend? Tia", "comment": "Have you considered asking about open positions in other parts of the company? As long as the pay is comparable, I should think you would do well at a help desk position or even higher.", "upvote_ratio": 30.0, "sub": "ITCareerQuestions"}875{"thread_id": "uo545e", "question": "I feel like the reason (correct me if I'm wrong) why healthcare is so expensive is because of the much higher quality of medical equipment and doctors in the US compared to the rest of the world.  Being a doctor or surgeon in the US is one of the highest paying professions in the world, alongside access to many of the best medical procedures compared to other countries.  \n\nAs such, will you be in favor of granting universal healthcare to all Americans, but in return reducing the quality of healthcare provided in public hospitals, and making premium healthcare in private clinics even more expensive than what it currently is?", "comment": "That's not the reason healthcare is so expensive. It's because its a for-profit system with middlemen like private health insurance running up the cost. Regulations on what these companies can charge are relatively poor when compared to countries with universal healthcare.", "upvote_ratio": 580.0, "sub": "AskAnAmerican"}876{"thread_id": "uo545e", "question": "I feel like the reason (correct me if I'm wrong) why healthcare is so expensive is because of the much higher quality of medical equipment and doctors in the US compared to the rest of the world.  Being a doctor or surgeon in the US is one of the highest paying professions in the world, alongside access to many of the best medical procedures compared to other countries.  \n\nAs such, will you be in favor of granting universal healthcare to all Americans, but in return reducing the quality of healthcare provided in public hospitals, and making premium healthcare in private clinics even more expensive than what it currently is?", "comment": "The quality of doctors and care in the US is not at all proportional to their cost and although we do have many excellent doctors, that is not the reason healthcare is so expensive here. Administrative bloat in the healthcare industry is a far bigger contributor. The lack of legal regulations and price caps is also a major factor. Prescription drugs are a great example of this. You can pay 3-4 times more for a drug in the US compared to getting *the same exact drug* elsewhere. Obviously there is no quality difference since it is the same exact drug. The price is high because pharma companies can charge a much as they want due the lack of legal regulations.\n\nEdit: spelling", "upvote_ratio": 190.0, "sub": "AskAnAmerican"}877{"thread_id": "uo545e", "question": "I feel like the reason (correct me if I'm wrong) why healthcare is so expensive is because of the much higher quality of medical equipment and doctors in the US compared to the rest of the world.  Being a doctor or surgeon in the US is one of the highest paying professions in the world, alongside access to many of the best medical procedures compared to other countries.  \n\nAs such, will you be in favor of granting universal healthcare to all Americans, but in return reducing the quality of healthcare provided in public hospitals, and making premium healthcare in private clinics even more expensive than what it currently is?", "comment": "I don't think this is an inherent tradeoff for universal healthcare", "upvote_ratio": 100.0, "sub": "AskAnAmerican"}878{"thread_id": "uo56or", "question": "I am writing a class that needs to be templated on two types which, in turn, must both be templated on the *same* type.\n\nThis isn't it:\n\n    template<typename T, typename Lower<T>, typename Upper<T>>\n\nBut what is?", "comment": "\ttemplate<class A, class B>\n\tstruct Fluffy;\n\n\ttemplate<class T, template<class> class A, template<class> class B>\n\tstruct Fluffy<A<T>, B<T>> : std::true_type\n\t{\n\t};", "upvote_ratio": 30.0, "sub": "cpp_questions"}879{"thread_id": "uo57ee", "question": "Like would there be a case of a President assuming he or she would have enough support to invade another country? Between 2022 and 2028 it\u2019s likely the President will be either Biden or Trump (and potentially Harris). The most likely nations that were to be invaded in recent years have been Iran and Venezuela. Although there have also been strong words towards Cuba and North Korea (though really doubt it considering they have nukes).", "comment": "I've got $5 on Liechtenstein.\n\nThey know what they did.", "upvote_ratio": 480.0, "sub": "AskAnAmerican"}880{"thread_id": "uo57ee", "question": "Like would there be a case of a President assuming he or she would have enough support to invade another country? Between 2022 and 2028 it\u2019s likely the President will be either Biden or Trump (and potentially Harris). The most likely nations that were to be invaded in recent years have been Iran and Venezuela. Although there have also been strong words towards Cuba and North Korea (though really doubt it considering they have nukes).", "comment": "No.\n\nIt's a wildly unpopular idea on both sides of the political spectrum.  At most you can expect stuff like we are doing with Ukraine.", "upvote_ratio": 290.0, "sub": "AskAnAmerican"}881{"thread_id": "uo57ee", "question": "Like would there be a case of a President assuming he or she would have enough support to invade another country? Between 2022 and 2028 it\u2019s likely the President will be either Biden or Trump (and potentially Harris). The most likely nations that were to be invaded in recent years have been Iran and Venezuela. Although there have also been strong words towards Cuba and North Korea (though really doubt it considering they have nukes).", "comment": "Not really. There\u2019s more to evaluating the potential of American military intervention than simply \u201cwe don\u2019t like them.\u201d", "upvote_ratio": 240.0, "sub": "AskAnAmerican"}882{"thread_id": "uo58lt", "question": "Hello I am an Australian who is currently backpacking around Europe who is considering hopping over to the USA for 3 to 4 weeks before I go down to South America. My main issue is that the USA is very expensive for backpackers with hostel dorms ranging from $50-100 AUD a night. I would love to explore parts of the east coast  flying into New York City and either going up through New England or south and visit places like Charleston, Asheville and the smoky mountains.\n\nI was just wondering if anyone had any tips on how to save money on a trip like this, is hiring a car the best option or is there buses I can take through the country.\n\nPs I actually do have a good bit of money saved up I would just prefer to have some left when I return home.", "comment": "You may have better luck with hotels than hostels. How do you plan on getting around? Hitchhiking is illegal in most of the U.S... Bus services are limited or can take a bit of time outside big cities and the northeast. We have virtually no passenger rail service again outside the Northeast.", "upvote_ratio": 670.0, "sub": "AskAnAmerican"}883{"thread_id": "uo58lt", "question": "Hello I am an Australian who is currently backpacking around Europe who is considering hopping over to the USA for 3 to 4 weeks before I go down to South America. My main issue is that the USA is very expensive for backpackers with hostel dorms ranging from $50-100 AUD a night. I would love to explore parts of the east coast  flying into New York City and either going up through New England or south and visit places like Charleston, Asheville and the smoky mountains.\n\nI was just wondering if anyone had any tips on how to save money on a trip like this, is hiring a car the best option or is there buses I can take through the country.\n\nPs I actually do have a good bit of money saved up I would just prefer to have some left when I return home.", "comment": "The big question is what is your budget? Hostels aren't really a thing in most places", "upvote_ratio": 580.0, "sub": "AskAnAmerican"}884{"thread_id": "uo58lt", "question": "Hello I am an Australian who is currently backpacking around Europe who is considering hopping over to the USA for 3 to 4 weeks before I go down to South America. My main issue is that the USA is very expensive for backpackers with hostel dorms ranging from $50-100 AUD a night. I would love to explore parts of the east coast  flying into New York City and either going up through New England or south and visit places like Charleston, Asheville and the smoky mountains.\n\nI was just wondering if anyone had any tips on how to save money on a trip like this, is hiring a car the best option or is there buses I can take through the country.\n\nPs I actually do have a good bit of money saved up I would just prefer to have some left when I return home.", "comment": "If you're backpacking -- especially in the American sense of the word -- why not go camping? It's often very cheap and sometimes even free to camp in a national or state park.\n\n\nThere are buses and trains you can take but if you are interested in nature it's harder. The stops are mostly only in urban centers, away from where you'd be hiking.", "upvote_ratio": 420.0, "sub": "AskAnAmerican"}885{"thread_id": "uo5i4i", "question": "So I\u2019m in a situation where I love learning about IT and tech and like the work duties but I abhor doing any home lab or practice labs outside of work. I enjoy taking notes while learning the theory. Is this a red flag?\n\nI\u2019m currently in a networking gig and I\u2019m motivated more when I have a work problem to solve than to emulate one on my own or to even lab. Even with coding, I don\u2019t enjoy building projects on my own unless someone gives me a problem to solve along with specific requirements. I don\u2019t think this is a focus issue bc it has been ruled out for me.\n\nHow can I get motivated with simple labs and enjoy breaking things in IT and in coding? Should I pursue more research-oriented tech careers or am I good?", "comment": "Labbing should be done on work time, it is training for your job imo.", "upvote_ratio": 1920.0, "sub": "ITCareerQuestions"}886{"thread_id": "uo5i4i", "question": "So I\u2019m in a situation where I love learning about IT and tech and like the work duties but I abhor doing any home lab or practice labs outside of work. I enjoy taking notes while learning the theory. Is this a red flag?\n\nI\u2019m currently in a networking gig and I\u2019m motivated more when I have a work problem to solve than to emulate one on my own or to even lab. Even with coding, I don\u2019t enjoy building projects on my own unless someone gives me a problem to solve along with specific requirements. I don\u2019t think this is a focus issue bc it has been ruled out for me.\n\nHow can I get motivated with simple labs and enjoy breaking things in IT and in coding? Should I pursue more research-oriented tech careers or am I good?", "comment": "If you're learning enough during work hours, why spend the time at home doing it, especially if you don't like it?", "upvote_ratio": 1440.0, "sub": "ITCareerQuestions"}887{"thread_id": "uo5i4i", "question": "So I\u2019m in a situation where I love learning about IT and tech and like the work duties but I abhor doing any home lab or practice labs outside of work. I enjoy taking notes while learning the theory. Is this a red flag?\n\nI\u2019m currently in a networking gig and I\u2019m motivated more when I have a work problem to solve than to emulate one on my own or to even lab. Even with coding, I don\u2019t enjoy building projects on my own unless someone gives me a problem to solve along with specific requirements. I don\u2019t think this is a focus issue bc it has been ruled out for me.\n\nHow can I get motivated with simple labs and enjoy breaking things in IT and in coding? Should I pursue more research-oriented tech careers or am I good?", "comment": "Not at all, the whole schtick a couple years ago about \"tech bros need home labs or they're just after the money!!\" Was and is retarded.\n\nThere's something complimentary about people who self select into fields they're passionate about and homelab on the weekends because they think it's cool, but the inverse is not a red flag, for sure.\n\nDuring college I homelabbed like crazy, because I was hungry and poor and unsure if I'd ever be able to pay of my student loans. After getting a job and learning to do my job well, I stopped all that shit.\n\nI chill in my free time, if company wants something, they can pay me.\n\n\nNot a red flag, do you playboi, we all gonna die someday and I guarantee folks on they death bed ain't concerned about not home labbing for their work enough", "upvote_ratio": 760.0, "sub": "ITCareerQuestions"}888{"thread_id": "uo5jja", "question": "What major events in your lifetime do you think should be in school textbooks but aren't?", "comment": "hard to answer because i have no idea whats been in school textbooks since the 90s", "upvote_ratio": 120.0, "sub": "AskOldPeople"}889{"thread_id": "uo5jja", "question": "What major events in your lifetime do you think should be in school textbooks but aren't?", "comment": "I think there should be a whole semester on medical history. Start with the dark ages and move up to the amazing medical discoveries of the present. Cover vaccines, how they work, and what they accomplished.", "upvote_ratio": 70.0, "sub": "AskOldPeople"}890{"thread_id": "uo5jja", "question": "What major events in your lifetime do you think should be in school textbooks but aren't?", "comment": "Looks like we old timers pretty much have the same response so I'll share something that happened BEFORE my lifetime that should be in school textbooks..\n\nThere is a city in Arkansas known as Pine Bluff. For thousands of years prior to being settled the region was subject to flooding from what would become known as the Arkansas River. The river also shifted over time and the cumulative effect was the buildup of rich, fertile land for planting crops.\n\nBy pre-Civil War era Pine Bluff had become a boom town. Farmers bought huge numbers of slaves to work the miles of farms and river access meant goods went out and money came in fast. Then the Civil War happened. Soon to be freed slaves were running all over the south for their lives, where would you go? For many slaves in Arkansas, the answer was obvious. Pine Bluff already had the highest concentration of slaves so they began heading that way.\n\nThe Confederate army, however, eventually begun running raids on the city. The Battle of Pine Bluff occurred when armed slaves joined forces with an arriving detachment of Union Troops to fend off the Confederates and save the city.\n\nNEVER in my life, much less at school, did I ever hear about armed slaves joining up with Union forces to save a city. I grew up pre-internet, obviously, so thanks to lots of research I now know WHY this and no telling how many stories like it have been lost although in hindsight it isn't that great a leap to make. Yes, the North won the Civil War but after the slaves were \"freed\" they still lived in the south with a bunchy of extremely pissed off racists who owned every damn thing in sight. Their descendants used their combined influence to drive these communities into poverty and anguish, all the while blaming black people for every bad thing that happens to them. Women, children, old folks... fish in a barrel. Once you lock up the breadwinner in a poverty level household you own every person living there.\n\nI seem to remember my History book jumping straight from the Civil War to the Industrial Revolution as if a magic wand had been waved and all the bad times for black folks were basically over? Until we get to Dr. King of course, but by then the discussion about black communities seems to move to what was going on in big cities. To this day all my homies down south are just flapping in the breeze because ARKANSAS? Who cares about Arkansas, right?? :/", "upvote_ratio": 50.0, "sub": "AskOldPeople"}891{"thread_id": "uo5lcf", "question": "I have worked at a variety of large corporations and all the PMs are only useful for scheduling meetings, that's it. \n\nThey can't communicate properly, because they usually mess up important details, so us technical resources do all the communications because we always have to do damage control when the PM inevitably communicates something completely wrong.\n\nI have never had a PM or BA make any project documents (Project charter, plan, work breakdown structure, etc), every project I've been on the technical resources do all of that. \n\nI have never had a requirement given to me, as a technical resource I have always had to elicit those, and usually they are completely contradictory to the scope of the project. \n\nProject managers say they manage \"time, quality, and budget\", but the vast majority of projects are over budget and not on time. Quality is laughable, most PMs have no idea what tech they are working with. Would you let someone with no mechanical skills judge the quality of a transmission change? \n\nOverall, I see project managers going way the dodo, most of what they do can be EASILY automated. good riddance", "comment": "Ah, I used to believe similar, than I started working with better and better PM's.\n\nTheir job isn't to hold your hand or provide documents for you, it's to liason between business and engineering and the domain leads for the impacted platforms to coordinate timelines, budget, etc.\n\nGood PM's are rare, But they do exist, and that skillet, done correctly, is well worth the cost. I don't need another tech nerd to explain some obscure detail that doesn't move the needle.\n\nWhy are they so rare, probably because they can really suck at their job and noone will notice until a couple projects down the line. Same with product managers.", "upvote_ratio": 170.0, "sub": "ITCareerQuestions"}892{"thread_id": "uo5lcf", "question": "I have worked at a variety of large corporations and all the PMs are only useful for scheduling meetings, that's it. \n\nThey can't communicate properly, because they usually mess up important details, so us technical resources do all the communications because we always have to do damage control when the PM inevitably communicates something completely wrong.\n\nI have never had a PM or BA make any project documents (Project charter, plan, work breakdown structure, etc), every project I've been on the technical resources do all of that. \n\nI have never had a requirement given to me, as a technical resource I have always had to elicit those, and usually they are completely contradictory to the scope of the project. \n\nProject managers say they manage \"time, quality, and budget\", but the vast majority of projects are over budget and not on time. Quality is laughable, most PMs have no idea what tech they are working with. Would you let someone with no mechanical skills judge the quality of a transmission change? \n\nOverall, I see project managers going way the dodo, most of what they do can be EASILY automated. good riddance", "comment": "* Conflict Resolution is HARD. Those that are good at this usually move into management rather quickly.\n* You have to know a lot about a lot. Being able to logically come up with a way to complete a project when it's having trouble isn't necessarily a straightforward thing, and understanding the business and how it interacts is a lot to know.\n* Most PM departments aren't setup correctly. If you're working at a company where you have a PM assigned to each project, projects start on the basis of someone just wanting a project started, and the only thing the PM does is scheduling - then your company is doing it wrong. Projects should be scored based on the same metrics - metrics derived from the goals of the company, Project Managers should be resolve conflicts between stakeholders, they should be helping plan out the individual tasks needed to complete the project, they should be managing stakeholder expectations, they should be resolving resource and time constraints when issues arise in the project - furthermore, the project management process should be governed by a Project Management Office - which should be completely separate from the Project Management team.\n\nI think you have a narrow outlook of what a Project Manager does and what their job is. The Project Manager isn't there to work FOR you. The Project Manager exists to work for the business, to make sure that the goals of the business are met for any given project. They are not technical experts, they are not meant to know how something should be implemented - that's your job. Their job is to facilitate whatever is needed for the implementation, to manage expectations of that implementation, and to make sure that implementation is happening that are within the bounds of the scope of the project.", "upvote_ratio": 100.0, "sub": "ITCareerQuestions"}893{"thread_id": "uo5lcf", "question": "I have worked at a variety of large corporations and all the PMs are only useful for scheduling meetings, that's it. \n\nThey can't communicate properly, because they usually mess up important details, so us technical resources do all the communications because we always have to do damage control when the PM inevitably communicates something completely wrong.\n\nI have never had a PM or BA make any project documents (Project charter, plan, work breakdown structure, etc), every project I've been on the technical resources do all of that. \n\nI have never had a requirement given to me, as a technical resource I have always had to elicit those, and usually they are completely contradictory to the scope of the project. \n\nProject managers say they manage \"time, quality, and budget\", but the vast majority of projects are over budget and not on time. Quality is laughable, most PMs have no idea what tech they are working with. Would you let someone with no mechanical skills judge the quality of a transmission change? \n\nOverall, I see project managers going way the dodo, most of what they do can be EASILY automated. good riddance", "comment": "I've worked with a handful of good ones, but you're right: most of them are glorified admin assistants.  I think the reason good ones are so hard to come by is that in order to be effective they really need to have at least a high-level understanding of the pieces in play and how they all fit together, and that's simply not always the case.  I don't expect a project manager to have in-depth knowledge of the entire tech stack, but they need to know (or be willing/able to learn) enough to be able to participate in the project beyond simply scheduling meetings.", "upvote_ratio": 100.0, "sub": "ITCareerQuestions"}894{"thread_id": "uo5r1m", "question": "Parents often teach their children second languages during their critical period, but does the same principle apply to musical instruments? Do we have so many extremely talented young musicians because of their developmental period, or do the parents just push their children to their limits?", "comment": "Language is a specialised function of the brain with dedicated areas. These have probably derived from evolutionary processes because language serves a selective function. In other words, we are predisposed to learn languages, especially during the first years of life.\n\nPlaying music is different, as we probably have not evolved to do that, albeit it builds on some basic evolved functions like rhythm, auditory discrimination and so on. It is much more of an acquired skill like learning to write or play chess.\n\nMost things in life are easier to learn when you're young as the brain is more plastic. I don't think there's anything special about playing music.", "upvote_ratio": 60.0, "sub": "AskScience"}895{"thread_id": "uo5r1m", "question": "Parents often teach their children second languages during their critical period, but does the same principle apply to musical instruments? Do we have so many extremely talented young musicians because of their developmental period, or do the parents just push their children to their limits?", "comment": "Music is practice. The more you practice, the more proficient you are. Thus, anyone can jam a violin\u2026with enough practice. \n\nSome people will have a knack, but those people still need to practice. The person who practices daily for a year, will be better than the person with a knack.", "upvote_ratio": 40.0, "sub": "AskScience"}896{"thread_id": "uo5snn", "question": "Just bought an S21 Ultra and right out of the box the phone wouldn't turn on/battery seemed dead. After plugging it in, the screen showed the circle as if it was charging, but showed no percentage amount.\n  \nAfter about 20 minutes it finally showed 1%, but has been charging really slowly. Is this normal? Roughly 30 minutes after plugging it in to charge and it's at 2%.\n  \nI know they don't ship with a charger block but at least assumed it would still be charged a little. :(", "comment": "20 minutes for 1%.\n\nI'd be getting that replaced. That's not right.", "upvote_ratio": 90.0, "sub": "AndroidQuestions"}897{"thread_id": "uo5snn", "question": "Just bought an S21 Ultra and right out of the box the phone wouldn't turn on/battery seemed dead. After plugging it in, the screen showed the circle as if it was charging, but showed no percentage amount.\n  \nAfter about 20 minutes it finally showed 1%, but has been charging really slowly. Is this normal? Roughly 30 minutes after plugging it in to charge and it's at 2%.\n  \nI know they don't ship with a charger block but at least assumed it would still be charged a little. :(", "comment": "Well there's usually some amount of charge in the battery, but how much of that original charge remains, sort of depends on how long that particular unit has been sitting in inventory. The longer its been sitting there, the more of the original charge will have slowly dissipated.", "upvote_ratio": 70.0, "sub": "AndroidQuestions"}898{"thread_id": "uo5snn", "question": "Just bought an S21 Ultra and right out of the box the phone wouldn't turn on/battery seemed dead. After plugging it in, the screen showed the circle as if it was charging, but showed no percentage amount.\n  \nAfter about 20 minutes it finally showed 1%, but has been charging really slowly. Is this normal? Roughly 30 minutes after plugging it in to charge and it's at 2%.\n  \nI know they don't ship with a charger block but at least assumed it would still be charged a little. :(", "comment": "Try a different cable and/or block.", "upvote_ratio": 30.0, "sub": "AndroidQuestions"}899{"thread_id": "uo5y00", "question": "I\u2019m tired and I need answers about this.\n\nSo I\u2019ve googled it and I haven\u2019t gotten a trusted, satisfactory answer. Is bar soap just a breeding ground for bacteria?\n\nMy tattoo artist recommended I use a bar soap for my tattoo aftercare and I\u2019ve been using it with no problem but every second person tells me how it\u2019s terrible because it\u2019s a breeding ground for bacteria. I usually suds up the soap and rinse it before use. I also don\u2019t use the bar soap directly on my tattoo.\n\nEdit: Hey, guys l, if I\u2019m not replying to your comment I probably can\u2019t see it. My reddit is being weird and not showing all the comments after I get a notification for them.", "comment": "In general, bar soap is inhospitable to most bacteria & viruses . Poorly made, extra ingredients (lotion/scents etc) and water-sogginess from age can all change the alkaline nature of the soap. But, for the most part, bar soaps are pretty dang good. \nPersonally, I prefer bar soap over liquid, but both are alkaline enough to kill organisms and clean well.  \n\n(Been a chemist in soap & cleaning industry)", "upvote_ratio": 82600.0, "sub": "AskScience"}900{"thread_id": "uo5y00", "question": "I\u2019m tired and I need answers about this.\n\nSo I\u2019ve googled it and I haven\u2019t gotten a trusted, satisfactory answer. Is bar soap just a breeding ground for bacteria?\n\nMy tattoo artist recommended I use a bar soap for my tattoo aftercare and I\u2019ve been using it with no problem but every second person tells me how it\u2019s terrible because it\u2019s a breeding ground for bacteria. I usually suds up the soap and rinse it before use. I also don\u2019t use the bar soap directly on my tattoo.\n\nEdit: Hey, guys l, if I\u2019m not replying to your comment I probably can\u2019t see it. My reddit is being weird and not showing all the comments after I get a notification for them.", "comment": "There is a lot of hype around this. My understanding is that bar soap acts as a surfactant, removing the oils and dirt that hold bacteria in suspension. Properly washing and rinsing should remove the majority of the bacteria, whether it comes from the soap or the surface. Rinsing bar soap and storing it in a clean location seems like a good idea.\n\nHere's a page with a lot of articles on the subject that seem a little more credible than the hype-y articles written by liquid soap companies: https://pubmed.ncbi.nlm.nih.gov/3402545/", "upvote_ratio": 7970.0, "sub": "AskScience"}901{"thread_id": "uo5y00", "question": "I\u2019m tired and I need answers about this.\n\nSo I\u2019ve googled it and I haven\u2019t gotten a trusted, satisfactory answer. Is bar soap just a breeding ground for bacteria?\n\nMy tattoo artist recommended I use a bar soap for my tattoo aftercare and I\u2019ve been using it with no problem but every second person tells me how it\u2019s terrible because it\u2019s a breeding ground for bacteria. I usually suds up the soap and rinse it before use. I also don\u2019t use the bar soap directly on my tattoo.\n\nEdit: Hey, guys l, if I\u2019m not replying to your comment I probably can\u2019t see it. My reddit is being weird and not showing all the comments after I get a notification for them.", "comment": "[removed]", "upvote_ratio": 3630.0, "sub": "AskScience"}902{"thread_id": "uo5znp", "question": "Me and my mates have been thinking of doing route 66 for a while now and I think we're gonna pull the trigger next summer. Any good ideas or recommendations on what we should do? Don't mind going a bit of course if it means we have a good time.\n\nAlso, should we rent a big car for the journey? Can we pick up a car in Chigaco and drop it of in L.A?", "comment": "Make sure you do your research.  Route 66 was decommissioned in 1985.  It is no longer considered a US highway and does not appear on modern maps.  Large portions of the road simply do not exist anymore.  There are maps you can get that outline how to follow the route as close as possible.  Some are paved and some are dirt roads.", "upvote_ratio": 430.0, "sub": "AskAnAmerican"}903{"thread_id": "uo5znp", "question": "Me and my mates have been thinking of doing route 66 for a while now and I think we're gonna pull the trigger next summer. Any good ideas or recommendations on what we should do? Don't mind going a bit of course if it means we have a good time.\n\nAlso, should we rent a big car for the journey? Can we pick up a car in Chigaco and drop it of in L.A?", "comment": "Generally you should stay on Route 66.\n\nJust sayin\u2019.\n\nSeriously though. In New Mexico, El Morro and El Malpais are just off the route. Santa Fe is a great side trip. Chaco and Bandelier are amazing. \n\nFlagstaff and Sedona are there. Grand Canton isn\u2019t too far off it.\n\nSedona if you go south off the road.\n\nPetrified Forest is awesome and right there.\n\nDeath Valley is there. If you can make it happen and it\u2019s definitely off the beaten path the Eureka Dunes. But you better have four wheel drive and plenty of water and probably spare gas.", "upvote_ratio": 210.0, "sub": "AskAnAmerican"}904{"thread_id": "uo5znp", "question": "Me and my mates have been thinking of doing route 66 for a while now and I think we're gonna pull the trigger next summer. Any good ideas or recommendations on what we should do? Don't mind going a bit of course if it means we have a good time.\n\nAlso, should we rent a big car for the journey? Can we pick up a car in Chigaco and drop it of in L.A?", "comment": "Having done this:\n\n* Our route was Chicago-Sioux Falls-Mt Rushmore-Denver-Salt Lake City-Las Vegas-Las Angeles. Old 66 sent you through a *lot* of the Great Plains (cause it's easier to build highways there) instead of through the more rugged parts of the country, but the rugged parts are much more interesting than corn forever. Our attitude was basically \"what's left of Route 66 is the road trip as an experience, not the route itself.\"\n* The only part of \"Route 66\" that has the vibes you probably think of when you think \"Route 66\" is in Arizona, where it parallels I-40 between Kingman and Seligman.\n* On the other hand, I-90 across South Dakota has very much the hokey vibes you'd expect from Route 66: there's a weird tourist trap every 15 minutes. Highly recommend Wall Drug, Original 1880 Pioneer Town (nothing original about it), Porter Sculpture Park, and the Corn Palace. Plus Mt Rushmore, of course.\n* I highly recommend crossing the Rockies in Colorado. It's gorgeous.", "upvote_ratio": 150.0, "sub": "AskAnAmerican"}905{"thread_id": "uo667e", "question": "Edit: Something having to do with installing clang-format in vs code messed up my copy paste and turned `=` into `==` in a couple places so I just re-edited them back correctly. Original post:\n\nOk, still trying to make my `iterator` for my `red black tree` which is roughly a `map`. I feel I know how to assign `begin()` but not `end()` so much, so I decided to do as I often do which is observe behaviours and try to imitate them so I make a simple piece of code to do that with `std::map`. \n\nNow, I don't know if I am doing something wrong or not but my results are tripping me out here. I am unable to cause any `segfault`s by supposedly going out of range. Is this an `associative container` thing I am supposed to be aware of? Am I doing something wrong or is this behaviour really desirable?\n\nThis is the output of my code:\n\n    Entered the following code:\n    std::map<int, char> tree;\n    tree[0] = 'a';\n    tree[10] = 'b';\n    tree[5] = 'c';\n    auto itEnd = tree.end();\n    auto itBegin = tree.begin();\n    --itBegin;\n\n    Derenferencing after using the pre-decrement operator on an iterator set to begin()\n     and just creating another iterator set to end():\n\n    itBegin->first = 3, itBegin->second =\n    itEnd->first = 3, itEnd->second = \n\n    Derenferencing after taking those same iterators and , pre-decrementing again the one\n     initially set to begin() and pre-incrementing the one set to end():\n\n    itBegin->first = 10, itBegin->second = b\n    itEnd->first = 10, itEnd->second = b\n\nThis is my code:\n\n    #include <iostream>\n    #include <map>\n\n    int main() {\n      std::map<int, char> tree;\n      tree[0] = 'a';\n      tree[10] = 'b';\n      tree[5] = 'c';\n      auto itEnd = tree.end();\n      auto itBegin = tree.begin();\n      --itBegin;\n\n      std::cout << \"\\nEntered the following code:\"\n                << \"\\nstd::map<int, char> tree;\\ntree[0] = 'a';\"\n                << \"\\ntree[10] = 'b';\\ntree[5] = 'c';\"\n                << \"\\nauto itEnd = tree.end();\"\n                << \"\\nauto itBegin = tree.begin();\\n--itBegin;\" << std::endl;\n      std::cout << \"\\nDerenferencing after using the pre-decrement operator on an \"\n                   \"iterator set to \"\n                   \"begin()\\n and just creating another iterator set to end():\\n\"\n                << std::endl;\n      std::cout << \"itBegin->first = \" << itBegin->first\n                << \", itBegin->second = \" << itBegin->second << std::endl;\n      std::cout << \"itEnd->first = \" << itEnd->first\n                << \", itEnd->second = \" << itEnd->second << std::endl;\n\n      --itBegin;\n      ++itEnd;\n      std::cout\n          << \"\\nDerenferencing after taking those same iterators and , \"\n             \"pre-decrementing again \"\n             \"the one\\n initially set to begin() and pre-incrementing the one \"\n             \"set to end():\\n\"\n          << std::endl;\n      std::cout << \"itBegin->first = \" << (*itBegin).first\n                << \", itBegin->second =\" << itBegin->second << std::endl;\n      std::cout << \"itEnd->first = \" << itEnd->first\n                << \", itEnd->second = \" << itEnd->second << std::endl;\n      puts(\"\");\n      return 0;\n    }", "comment": "I am fairly sure that\n\n    auto itBegin = tree.begin();\n    --itBegin;\n\nis undefined behaviour as you are moving an iterator out of the valid range. The libstdc++ debug mode says its illegal: https://godbolt.org/z/8E33EKzs4 . Certainly dereferencing `itBegin` after moving it out of range is UB.\n\nSimilarly, incrementing `itEnd` and dereferencing an end iterator are UB as well.\n\nBy the nature of UB, *anything* can happen. By definition you cannot reason about it or have any expectations.", "upvote_ratio": 50.0, "sub": "cpp_questions"}906{"thread_id": "uo667e", "question": "Edit: Something having to do with installing clang-format in vs code messed up my copy paste and turned `=` into `==` in a couple places so I just re-edited them back correctly. Original post:\n\nOk, still trying to make my `iterator` for my `red black tree` which is roughly a `map`. I feel I know how to assign `begin()` but not `end()` so much, so I decided to do as I often do which is observe behaviours and try to imitate them so I make a simple piece of code to do that with `std::map`. \n\nNow, I don't know if I am doing something wrong or not but my results are tripping me out here. I am unable to cause any `segfault`s by supposedly going out of range. Is this an `associative container` thing I am supposed to be aware of? Am I doing something wrong or is this behaviour really desirable?\n\nThis is the output of my code:\n\n    Entered the following code:\n    std::map<int, char> tree;\n    tree[0] = 'a';\n    tree[10] = 'b';\n    tree[5] = 'c';\n    auto itEnd = tree.end();\n    auto itBegin = tree.begin();\n    --itBegin;\n\n    Derenferencing after using the pre-decrement operator on an iterator set to begin()\n     and just creating another iterator set to end():\n\n    itBegin->first = 3, itBegin->second =\n    itEnd->first = 3, itEnd->second = \n\n    Derenferencing after taking those same iterators and , pre-decrementing again the one\n     initially set to begin() and pre-incrementing the one set to end():\n\n    itBegin->first = 10, itBegin->second = b\n    itEnd->first = 10, itEnd->second = b\n\nThis is my code:\n\n    #include <iostream>\n    #include <map>\n\n    int main() {\n      std::map<int, char> tree;\n      tree[0] = 'a';\n      tree[10] = 'b';\n      tree[5] = 'c';\n      auto itEnd = tree.end();\n      auto itBegin = tree.begin();\n      --itBegin;\n\n      std::cout << \"\\nEntered the following code:\"\n                << \"\\nstd::map<int, char> tree;\\ntree[0] = 'a';\"\n                << \"\\ntree[10] = 'b';\\ntree[5] = 'c';\"\n                << \"\\nauto itEnd = tree.end();\"\n                << \"\\nauto itBegin = tree.begin();\\n--itBegin;\" << std::endl;\n      std::cout << \"\\nDerenferencing after using the pre-decrement operator on an \"\n                   \"iterator set to \"\n                   \"begin()\\n and just creating another iterator set to end():\\n\"\n                << std::endl;\n      std::cout << \"itBegin->first = \" << itBegin->first\n                << \", itBegin->second = \" << itBegin->second << std::endl;\n      std::cout << \"itEnd->first = \" << itEnd->first\n                << \", itEnd->second = \" << itEnd->second << std::endl;\n\n      --itBegin;\n      ++itEnd;\n      std::cout\n          << \"\\nDerenferencing after taking those same iterators and , \"\n             \"pre-decrementing again \"\n             \"the one\\n initially set to begin() and pre-incrementing the one \"\n             \"set to end():\\n\"\n          << std::endl;\n      std::cout << \"itBegin->first = \" << (*itBegin).first\n                << \", itBegin->second =\" << itBegin->second << std::endl;\n      std::cout << \"itEnd->first = \" << itEnd->first\n                << \", itEnd->second = \" << itEnd->second << std::endl;\n      puts(\"\");\n      return 0;\n    }", "comment": "What are you think you are doing with --itBegin?   That's not a valid operation.\n\nitEnd doesn't refer to an item in the map.  Standard container end() returns   \"one past the end\" so while you can compare some iterator to it, you can't \"derference\" it like you are doing.", "upvote_ratio": 40.0, "sub": "cpp_questions"}907{"thread_id": "uo66oj", "question": ">Hello,  \n>  \n>I cannot get my code to compile and cannot figure out why the code is not working either. The purpose of the code is to have a fictional store with allowing the user to enter:  \n>  \n>case 1: add new item containing upc number, item name, cost, and quantity in inventory  \n>  \n>case 2: print entire hashtable  \n>  \n>case 3: find/search for an item by the id (or upc)  \n>  \n>case 4: find/search for an item by its name  \n>  \n>case 5: sort all items in hashtable by alphabetical order  \n>  \n>case 6: quit  \n>  \n>Any assistance is greatly appreciated! I have included the replit link here to access the code [https://replit.com/@kylemark608/KylesKode#main.cpp](https://replit.com/@kylemark608/KylesKode#main.cpp)  \n>  \n>  \n>  \n>Files needed:   \n>  \n>main.cpp  \n>  \n>kyleskode.cpp  \n>  \n>kyleskode.hpp", "comment": "I suggest you simply start by addressing each compiler error one by one. Each one is pretty obvious: just read the error message and do something about it. If there is an error where you do not understand what it says, then ask for clarification here - but first read it at least three times trying to decipher it, then try to read it aloud as if explaining it to an imaginary friend (or use a rubber duck) - don't just glimpse over it. Read it, study it, google it, read some more, make an effort - that is how you learn!", "upvote_ratio": 50.0, "sub": "cpp_questions"}908{"thread_id": "uo6f3l", "question": "Hi friends. I'm trying to figure out which way to take my career and could use some advice. I feel kind of split between cloud engineer and architect. I've been in technical roles for 15+ years, most recently a member of a cloud engineering team managing a multi-region, multi-account AWS footprint (\\~$3m/yr) for about a year. SysAdmin/Cloud Ops for Windows/Linux for about five years with some blending between that role and the current one.  I obtained my AWS Cloud Practitioner cert earlier this year and found it easy. I'll be taking the Solutions Architect - Associate exam next week and expect to pass.\n\nThe AWS environment I manage now is 90% IaC/CI/CD managed (though I am more a consumer of those pipelines than a maintainer). I really enjoy building solutions and putting the AWS lego blocks together utilizing IaC as much as possible. More recently diving into Lambda and APIGW. Intimately familiar with most of the core services, EC2/S3/EFS/VPC/TGW/IAM etc etc. \n\nMy mentor recently left for a role at AWS (you're probably reading this, you bastard) and now I find myself in a position with a high degree of responsibility but without any in-house technical mentorship. I've greatly benefited from such relationships over my career and I fear I'll stagnate without it. Combine this with a company that is beginning to depend on individual contributors not knowing their worth, I think it's time to move on. I'm interested in Cloud Engineer and Cloud Architect roles, potentially at AWS, but I'm not sure which would best align with my skill set or which direction I should develop. DevOps is interesting to me and is probably a good fit mid-term but I would need to find a way to get more hands on experience beyond personal projects. I've nearly finished the Cloud Resume Challenge, probably a little below my skill set but added some CI/CD spice and other flare to explore more services.  \n\n\nThanks for reading. Any advice is appreciated.", "comment": "across industry- these roles are basically the same. There's a ton of overlap.\n\nAt AWS- it highly depends on which business unit you sit in. Cloud Engineer should feed to architect. DevOps should align with SWE, in most cases, SWEs at AWS ARE devops but it's culturally built into the SWE teams. There ARE DevOps engineer titles but by in large most are just SWEs.\n\nIf you're customer facing- it more tends to be cloud engineer->TAM->SA or AM", "upvote_ratio": 30.0, "sub": "ITCareerQuestions"}909{"thread_id": "uo6lmi", "question": "What is the best sandwich?", "comment": "Reuben!", "upvote_ratio": 340.0, "sub": "AskOldPeople"}910{"thread_id": "uo6lmi", "question": "What is the best sandwich?", "comment": "Good French dip with proper au jus.", "upvote_ratio": 280.0, "sub": "AskOldPeople"}911{"thread_id": "uo6lmi", "question": "What is the best sandwich?", "comment": "A nice MLT \u2013 mutton, lettuce and tomato sandwich, where the mutton is nice and lean and the tomato is ripe. They\u2019re so perky, I love that.", "upvote_ratio": 120.0, "sub": "AskOldPeople"}912{"thread_id": "uo6mp3", "question": "I'm sure throughout our nation's history, there has been some association between the president and the economy, but it seems like it's at an absolute fever pitch lately. The notion of the free market is supposed to be such that the government can only have certain (quite limited) impacts on the economy. That's mostly true in America, but it seems like the public discourse has made it seem like the economy is the individual president's only responsibility. When did that dynamic begin to emerge? I have my own thoughts but would like to hear others.\n\nEdit: I believe this will inevitably lead to nationalization of some industries. What do you think will be nationalized first? In the name of \"protecting the economy\"", "comment": "Voters only care about two things when they go to vote...who is in charge...and how is my life going. That's it.", "upvote_ratio": 630.0, "sub": "AskAnAmerican"}913{"thread_id": "uo6mp3", "question": "I'm sure throughout our nation's history, there has been some association between the president and the economy, but it seems like it's at an absolute fever pitch lately. The notion of the free market is supposed to be such that the government can only have certain (quite limited) impacts on the economy. That's mostly true in America, but it seems like the public discourse has made it seem like the economy is the individual president's only responsibility. When did that dynamic begin to emerge? I have my own thoughts but would like to hear others.\n\nEdit: I believe this will inevitably lead to nationalization of some industries. What do you think will be nationalized first? In the name of \"protecting the economy\"", "comment": "I think the federal reserve act and Glass Steagall created the expectation that the economy was ultimately under the control of politicians rather than bankers.", "upvote_ratio": 550.0, "sub": "AskAnAmerican"}914{"thread_id": "uo6mp3", "question": "I'm sure throughout our nation's history, there has been some association between the president and the economy, but it seems like it's at an absolute fever pitch lately. The notion of the free market is supposed to be such that the government can only have certain (quite limited) impacts on the economy. That's mostly true in America, but it seems like the public discourse has made it seem like the economy is the individual president's only responsibility. When did that dynamic begin to emerge? I have my own thoughts but would like to hear others.\n\nEdit: I believe this will inevitably lead to nationalization of some industries. What do you think will be nationalized first? In the name of \"protecting the economy\"", "comment": "WAY too many people think that the president is directly in control of EVERYTHING now.  Blame instant mass-media and everyone's expectation of a quick instant answer to all ills.", "upvote_ratio": 490.0, "sub": "AskAnAmerican"}915{"thread_id": "uo6tzp", "question": "Do we have any estimate for how much a person can actually know?  And what happens when they reach that limit?  Does learning new things become impossible?  Do older memories simply get overwritten?  Or do things just start to get jumbled like a double-exposed piece of film?", "comment": "You seem to think that biological memory storage is in any way similar to computer memory. The two cannot be more different. You have to come up with a completely different way to measure \u201cmemory capacity\u201d for your question to make sense. \n\nIn biology minor details are unimportant and easily replaceable. Generalization and reconstruction from those generalizations are the norm. Selectively forgetting is in fact one of the most important function of our brain. It\u2019s how generalization becomes possible. \n\nIf you know something about polynomial approximations, the brain is like a very high order polynomial approximating that data that you think it\u2019s storing. It would gladly replace one similar situation by another and interpolate your memories to fit. Save for a few highly-trained or neuro-diverse individuals, memory is very unreliable when it comes to specific details from long ago. Only the contours remain.", "upvote_ratio": 960.0, "sub": "AskScience"}916{"thread_id": "uo6tzp", "question": "Do we have any estimate for how much a person can actually know?  And what happens when they reach that limit?  Does learning new things become impossible?  Do older memories simply get overwritten?  Or do things just start to get jumbled like a double-exposed piece of film?", "comment": "Approx 2.5 petabytes or a million gigabytes, all things being equal. This is about the same as almost 4,000 avg 256 gig laptops. You might think \"then why can I not compute like a computer?\" but you have to remember all the \"background process and apps (breathing, blood pressure regulation, hormonal regulation, etc)\" your body has going on at any one point. Also, it didn't evolve to make you a successful human by computing mathematics at a high level like a computer can do. It's also having to construct reality at all conscious moments using your senses. We never experience actual reality, only what our brain represents as reality. This takes a lot of computing power. The graphics and refresh rate are intense...", "upvote_ratio": 860.0, "sub": "AskScience"}917{"thread_id": "uo6tzp", "question": "Do we have any estimate for how much a person can actually know?  And what happens when they reach that limit?  Does learning new things become impossible?  Do older memories simply get overwritten?  Or do things just start to get jumbled like a double-exposed piece of film?", "comment": "One thing is you're comparing digital data to analog data.\n\nI'll give a quick overview of how I think the biggest differences are between neuroscience and computer science.\n\nMost real objects in real life are **analog, or scalar**, meaning they have a theoretical range, and usually a theoretical minimum, and maximum. I use theoretical because it's not a mathematical definition, just, in theory here...\n\nMinimum knowledge and intelligence could be assumed to be just during birth, at about 0 seconds old, or even near death, where all knowledge of existence for you would fade away, as it when the brain \"starts up\" or \"ceases to function\", so that would be the \"minimum capacity\". That's not really a scientific thing to say, but that's what I'm going with.\n\nMaximum capacity is extremely harder to define, and very subjective. The brain ages as someone gets older, obviously. But while brain ages, and synapses become engaged, some even disengage or regress as we get even older.\n\nI already know IQ isn't a good study of how smart or wise someone is, since IQ is assigning digital data (a digital, numerical score rating) to the human brain's knowledge, intelligence and wisdom (analog).\n\nBut remember the brain performs a lot of functions in the body, not just for thinking. Some of these functions \"work best\" at a very certain age, during very certain situations, or are even environmentally dependent, or even based on genetics. In a terrorist or life-threatening situation, your brain would work differently than is it was relaxed or on drugs/medication.\n\nThe thing is, you ever wonder why scientists like Einstein, Hawking, Carl Sagan, Curie, and so many others *are* like geniuses? It isn't \"brain capacity\", it's not \"how smart you are\". It's your ability to innovate, to think outside the box, the prove your theory is correct after hours and hours of hard work and intense thoughts.\n\nIt takes a special person to be like that, or even dedicate their whole life to science as a passion. Even though a lot of us like to believe we are not special deep down inside, I still consider every person as unique, because every person is an individual physical, separate body, and spiritualists think differently, but I'm trying to talk science here, what we already know is true.\n\nTherefore we are all special, we have individual and unique thoughts that are thought up of our own, and some of these thoughts originate from not very special or not very unique things in life, but the person who is \"I\" only has these special thoughts, if we're talking psychology here.\n\n**Digital data**, on the other hand, is defined more with math and logic, as having sets of numbers, usually a number base definition like data can be stored as binary, which is the most usual type of digital storage, or octal, decimal, etc... It usually has fixed or variable capacity, **not scalar**, and we know the minimum is always zero, and the maximum is the storage capacity. \n\nYou can't say that the brain's minimum capacity is zero. that just makes no sense. if the brain has zero knowledge, you might as well say exactly that **there is no brain at all**. The brain has to be holding some knowledge in order for it to function and make you become alive, like how to breathe, eat, or take a shit.\n\nSo comparing a human brain to a CPU in a computer is just a really bad idea for the sake of science. Don't do it. They're really not the same thing.\n\nSame thing when people argue that your cameras are like eyes, and \"how many FPS can we see?\" or \"what is the maximum resolution that we can see?\" or that the ears are microphones, and \"what are exactly the maximum frequencies we can hear?\"\n\nNot only are those all going to result in different answers for most individuals, they are just not really well defined. We haven't advanced enough in neuro-technology and the sciences in general to make comparisons like that, and answer questions like that. It's pretty pointless to ask right now until we get to a stage where we're already building personal consumer androids for our homes with the latest AI, and then we want to make them be \"as human-like as possible\".\n\nSo ask it in the next 3000 years, and I'm sure people will answer differently.", "upvote_ratio": 40.0, "sub": "AskScience"}918{"thread_id": "uo6x77", "question": "Basically, I was reached out to by a recruiter from a contracting company who wants me to be a contractor for American Red Cross. It's a Level 1 helpdesk position. The recruiter told me that I was the best candidate they had seen so far. I live in a low cost of living southeast town, and both curious if a 6 month contractor position is a bad idea, and if the company is legit.", "comment": "1. I don't know if Yoh is legit.\n2. Contractor positions can be OK. As you already stated, its short term and there most likely won't be benefits.\n3. $18/hr seems to be about the going rate these days, depending on location. Things to keep in mind:\n   1. Its entry level work\n   2. Your cost of living may be high\n   3. Your lifestyle may not be supported\n4. It could be a good jumping off spot for you to get some experience.", "upvote_ratio": 30.0, "sub": "ITCareerQuestions"}919{"thread_id": "uo76gp", "question": "Obligatory, sorry for formating (on mobile).\n\nSo, I have an internship lined up with one of the silicon valley boys this summer, and, until now, the whole on boarding process has seemed fairly sporadic and disorganized. Nothing insane, just kind of a lack of information disclosure and not meeting set timelines for getting information to interns.\n\nHowever, I just received an email from my team manager specifying that our team will be working entirely remotely. Now, I would be fine with this if I was told a month ago, but I am a few weeks from my start date. I have already signed a lease for the summer and now find myself spending thousands on an apartment that I do not need.\n\nI guess I'm just reaching out to see if anyone else has had a similar experience/if anyone has advice on what I could do in this situation.\n\nEdit: Thanks for all the great advice! After mulling it over myself and talking with my manager, I'm going to take many of you guy's advice and move out there anyway. While it is expensive I think it will be a great time and an amazing opportunity.(Also it does give me a chance to test drive west coast living before committing to a full time job out there, which is really nice)", "comment": "lol this guy is gonna get his lease transfered and one week before the internship find out its no longer remote", "upvote_ratio": 5190.0, "sub": "CSCareerQuestions"}920{"thread_id": "uo76gp", "question": "Obligatory, sorry for formating (on mobile).\n\nSo, I have an internship lined up with one of the silicon valley boys this summer, and, until now, the whole on boarding process has seemed fairly sporadic and disorganized. Nothing insane, just kind of a lack of information disclosure and not meeting set timelines for getting information to interns.\n\nHowever, I just received an email from my team manager specifying that our team will be working entirely remotely. Now, I would be fine with this if I was told a month ago, but I am a few weeks from my start date. I have already signed a lease for the summer and now find myself spending thousands on an apartment that I do not need.\n\nI guess I'm just reaching out to see if anyone else has had a similar experience/if anyone has advice on what I could do in this situation.\n\nEdit: Thanks for all the great advice! After mulling it over myself and talking with my manager, I'm going to take many of you guy's advice and move out there anyway. While it is expensive I think it will be a great time and an amazing opportunity.(Also it does give me a chance to test drive west coast living before committing to a full time job out there, which is really nice)", "comment": "Leverage the fact you are in the bay area. Attend meetups, mingle, connect with people from other tech companies, join internship programs / events on campus, visit stanford, visit the parks. It can be much more than just an internship.", "upvote_ratio": 2950.0, "sub": "CSCareerQuestions"}921{"thread_id": "uo76gp", "question": "Obligatory, sorry for formating (on mobile).\n\nSo, I have an internship lined up with one of the silicon valley boys this summer, and, until now, the whole on boarding process has seemed fairly sporadic and disorganized. Nothing insane, just kind of a lack of information disclosure and not meeting set timelines for getting information to interns.\n\nHowever, I just received an email from my team manager specifying that our team will be working entirely remotely. Now, I would be fine with this if I was told a month ago, but I am a few weeks from my start date. I have already signed a lease for the summer and now find myself spending thousands on an apartment that I do not need.\n\nI guess I'm just reaching out to see if anyone else has had a similar experience/if anyone has advice on what I could do in this situation.\n\nEdit: Thanks for all the great advice! After mulling it over myself and talking with my manager, I'm going to take many of you guy's advice and move out there anyway. While it is expensive I think it will be a great time and an amazing opportunity.(Also it does give me a chance to test drive west coast living before committing to a full time job out there, which is really nice)", "comment": "That\u2019s sucks man. See if you buy out the lease for a 50% of the total. Or maybe the landlord will let you out if he can find another tenant and you only pay for the days between your lease start and when he gets a new lease signed. I\u2019d ask. People are sometimes reasonable.", "upvote_ratio": 2820.0, "sub": "CSCareerQuestions"}922{"thread_id": "uo7fmh", "question": "If bleach is used to sanitize, say, a bathroom, is there any practical risk to using other cleaners on the same surfaces shortly after? e.g. bleach is used to clean a bathroom counter, and Windex is used to spray the mirror above in the same cleaning session where some spray is likely to hit the counter; or a shower is cleaned with a bleach solution, and next day a citric acid-based daily shower spray is used on the same surfaces.\n\nI'm assuming there's going to be some residual bleach, for some period of time after using it to clean. But I have no idea what amount would produce enough fumes to be dangerous.", "comment": "*Concentration* and *quantity* are both important.\n\n* *Quantity* of two sprays accidentally mixing together is going to be an absolutely tiny. \n\n* *Concentration* when mixing on a hard flat surface open to a big room with (probably) okay air flow - also tiny.\n\nStories you read of people mixing two incompatible chemicals together tend to be dumping a whole bottle of each into a closed vessel like a toilet.  They get a sudden blast of fumes, almost like standing over a chimney.  But even then, fairly quickly the fumes dissipate into the room.\n\nBoth of those chemicals you mention a very soluble in water, and realstically, very reactive.  That means it's intense but they also go away quickly.  Your bleach has a half-life on a surface measured in minutes, or realistically only seconds if you're following the instructions on the label.\n\nAdded effect of a wet room with high humidity, steam, active fan/window extraction and water flowing.  Yeah, you're going to be completely fine.", "upvote_ratio": 90.0, "sub": "AskScience"}923{"thread_id": "uo7fmh", "question": "If bleach is used to sanitize, say, a bathroom, is there any practical risk to using other cleaners on the same surfaces shortly after? e.g. bleach is used to clean a bathroom counter, and Windex is used to spray the mirror above in the same cleaning session where some spray is likely to hit the counter; or a shower is cleaned with a bleach solution, and next day a citric acid-based daily shower spray is used on the same surfaces.\n\nI'm assuming there's going to be some residual bleach, for some period of time after using it to clean. But I have no idea what amount would produce enough fumes to be dangerous.", "comment": "But why though? The mirror example makes sense, and no that\u2019s not enough to have a reaction big enough to worry about. The other example, why would you need to clean a thing that you just bleached? Is it not clean enough? If so then why even use the bleach? \n\nAnyway to answer, it\u2019s probably not enough to worry about, but probably best I just throw some water over the area that might have residual bleach before spraying the citric acid solution. Water. That\u2019s all", "upvote_ratio": 40.0, "sub": "AskScience"}924{"thread_id": "uo7s3a", "question": "Common optimization flags for compilers like gcc or clang have the O2 or O3 flag. I am willing to increase compile time to optimize the program more, such as better code generation, more precise ILP solution. Is there a way to specify this in gcc or clang?", "comment": "Besides `-O3`, also be sure you allow the compiler to use all the possible extra CPU instructions the architecture you aim support, see: https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html Note however, that this means that the binary won't necessarily be portable across different CPUs.\n\nYou can also look into Profile Guided Optimizations, see e.g.: https://rigtorp.se/notes/pgo/\n\nBesides that there isn't much more you can do: run your code through a profiler (like [Intel VTune](https://www.intel.com/content/www/us/en/developer/tools/oneapi/vtune-profiler.html)) and do manual optimizations.\n\nEDIT: I know you specify ILP, but if you by any chance also do floating point math, then be sure to also enable `-ffast-math`.", "upvote_ratio": 90.0, "sub": "cpp_questions"}925{"thread_id": "uo7s3a", "question": "Common optimization flags for compilers like gcc or clang have the O2 or O3 flag. I am willing to increase compile time to optimize the program more, such as better code generation, more precise ILP solution. Is there a way to specify this in gcc or clang?", "comment": "Is there anything you can pre compute? Maybe constexpr can be your friend.", "upvote_ratio": 30.0, "sub": "cpp_questions"}926{"thread_id": "uo7ufj", "question": "I read upto lists and dictionaries in Automate the Boring stuff, and watched the videos on youtube for those chapters. The excercises seemed to ask for stuff that i had not learnt or were far ahead of my learning so far. \n\nDived into 'Python Crash Course' and haven't looked back. This book is fun, engaging, and all the excersises are relevant to what you have just learnt. \n\nI will go back to 'Automate' but was overwhelmed and skipped most of the chapter excercises, as they seemed too difficult", "comment": "They are aimed at different audiences\n\nI like the content in PCC, but ATBS is still the best thing to hand a frustrated desk jockey with limited time who wants to make their lives easier\n\nIt pays immediate practical dividends, which is the most important thing for keeping those sorts of people motivated and learning", "upvote_ratio": 1910.0, "sub": "LearnPython"}927{"thread_id": "uo7ufj", "question": "I read upto lists and dictionaries in Automate the Boring stuff, and watched the videos on youtube for those chapters. The excercises seemed to ask for stuff that i had not learnt or were far ahead of my learning so far. \n\nDived into 'Python Crash Course' and haven't looked back. This book is fun, engaging, and all the excersises are relevant to what you have just learnt. \n\nI will go back to 'Automate' but was overwhelmed and skipped most of the chapter excercises, as they seemed too difficult", "comment": "PCC is for programming/software engineering\n\nATBS is for automating things\n\nEach has their own audience", "upvote_ratio": 730.0, "sub": "LearnPython"}928{"thread_id": "uo7ufj", "question": "I read upto lists and dictionaries in Automate the Boring stuff, and watched the videos on youtube for those chapters. The excercises seemed to ask for stuff that i had not learnt or were far ahead of my learning so far. \n\nDived into 'Python Crash Course' and haven't looked back. This book is fun, engaging, and all the excersises are relevant to what you have just learnt. \n\nI will go back to 'Automate' but was overwhelmed and skipped most of the chapter excercises, as they seemed too difficult", "comment": "+1\n\nPCC is also more interesting. But the first part of atbs (the one covering basics) is slightly more detailed than pcc.\n\nThe second part of atbs is just too much for beginners, imo and also not interesting at all, but YMMV.", "upvote_ratio": 260.0, "sub": "LearnPython"}929{"thread_id": "uo7ulk", "question": "I'm currently working as an SRE in Europe and would like to move to another country.\n\nWhats the best way to look for jobs that are willing to hire people from other countries?", "comment": "The best way is to get a local job with a company that has offices in the country you're interested in, and then work on an international transfer within that company.", "upvote_ratio": 30.0, "sub": "ITCareerQuestions"}930{"thread_id": "uo82u5", "question": "Currently I troubleshoot and repair laptops. I\u2019ve been looking to get the Trifecta but I wondered if that\u2019s necessary. Anything else I should look into?", "comment": "A+ is the way to go here.", "upvote_ratio": 80.0, "sub": "ITCareerQuestions"}931{"thread_id": "uo8410", "question": "I am in college and getting a degree and was wondering, is a computer science degree the best degree to get for landing various types of IT jobs and having that strong foundation to enter various/most types of IT/tech/cs related jobs?\n\nI know for specific areas I will upskill by adding relevant certifications, and outside self learning, projects, homelabs etc,\n\nBut to get that strong foundation for career in IT, would it be one of the best degrees to get? I feel it be better than a information systems, management information systems, or information technology degree. Would you agree? ", "comment": "If you are willing to put in the work, you should absolutely get a CS degree instead of an IT degree. It will open more doors.\n\nHowever, there is no free lunch. A CS degree is difficult, and a good program will have a lot of math. CS programs have an incredibly high number of dropouts into other majors as a result. The level to which you'll learn hands-on vs. learning applied mathematics and theory depends on the university and the program. Some schools, for example, offer two separate degrees in Computer Science and Software Engineering.", "upvote_ratio": 70.0, "sub": "ITCareerQuestions"}932{"thread_id": "uo8410", "question": "I am in college and getting a degree and was wondering, is a computer science degree the best degree to get for landing various types of IT jobs and having that strong foundation to enter various/most types of IT/tech/cs related jobs?\n\nI know for specific areas I will upskill by adding relevant certifications, and outside self learning, projects, homelabs etc,\n\nBut to get that strong foundation for career in IT, would it be one of the best degrees to get? I feel it be better than a information systems, management information systems, or information technology degree. Would you agree? ", "comment": "I would say Computer Science is one of the best degrees because it would let you transition into Software Engineering if you wanted. That is a much, much more lucrative career path in today's world. Management Information Systems would probably be better if you were dead set on just IT itself as it's also a business degree and will help you out in the future going for high-level management positions.\n\nOr you don't have to get any degree and can just work your way up the ladder at potentially a slightly slower pace but still will end up in a good place if you continue to keep up on your own education and switching jobs when you hit a point at an employer where you can't really grow any further.", "upvote_ratio": 70.0, "sub": "ITCareerQuestions"}933{"thread_id": "uo8410", "question": "I am in college and getting a degree and was wondering, is a computer science degree the best degree to get for landing various types of IT jobs and having that strong foundation to enter various/most types of IT/tech/cs related jobs?\n\nI know for specific areas I will upskill by adding relevant certifications, and outside self learning, projects, homelabs etc,\n\nBut to get that strong foundation for career in IT, would it be one of the best degrees to get? I feel it be better than a information systems, management information systems, or information technology degree. Would you agree? ", "comment": "CS is the best degree for tech, and opens many more doors than IT/MIS/IS, and I myself have an IT degree. If you can manage the extra math and theory courses, you'll have a much easier time finding an internship, jobs, and at better places. An IT degree can open doors for sys admin, helpdesk, or other related roles, but CS does the same in addition to SWE/DevOps/SRE. \n\nStarting salaries are higher for CS because of these other jobs you can get and at better companies which pay much more.", "upvote_ratio": 60.0, "sub": "ITCareerQuestions"}934{"thread_id": "uo8bbk", "question": "If a person dont know about python programming, how he able to know how long it will take for a developer to implement that idea?\n\nI have an idea, where i need to hire someone to creat web app.\n\nWould you please able to give some suggestion / idea how can i estimate my project time and cost.\n\nAm i need to hire freelance software engineer to plan that project sprint by sprint or full stack develoer who able to give whole project plan then i will hire any junior developer?\n\nIf i ask on upwork different developer give different price. Some of them are quoting 300 - 500$ some are quoting 4k to 7k. This price change totally confuse me.\n\nI need your help what step i should take to minimize cost and successfully launch my project.\n\nWhat i need to ask?  Line of code he wrote? Feature he include? Scaleablity?", "comment": "Anybody quoting less than $1000 for a non-trivial software project is either completely unaware of the value of their labor (suggesting inexperience), or isn't particularly motivated by cash, and by extension, not very motivated by you. That's like 2 days at a junior dev salary, or less than a day of a consultant's time.\n\nThe 4-7k quotes, if based on actually hearing your project pitch, sound reasonable for a basic website or app and the corresponding simple backend tied to a database, being done by someone who basically understands what they're doing but doesn't have great job prospects, maybe because they're a student or something. Given those circumstances, I would probably pitch a timeframe 2-6 weeks, depending on whether the dev is working on the project full time or not.", "upvote_ratio": 30.0, "sub": "AskProgramming"}935{"thread_id": "uo8qqj", "question": "enable_if stopped working for constructors. Can someone check please. thanks!\n\nEDIT: The issue is with the copy constructor with enable_if being deleted when the move constructor is defined without enable_if. Same issue on GCC.", "comment": "https://godbolt.org/z/ec9q7qesr", "upvote_ratio": 30.0, "sub": "cpp_questions"}936{"thread_id": "uo8qqj", "question": "enable_if stopped working for constructors. Can someone check please. thanks!\n\nEDIT: The issue is with the copy constructor with enable_if being deleted when the move constructor is defined without enable_if. Same issue on GCC.", "comment": "If it did stop working, we'd have to call it SFIAE.", "upvote_ratio": 30.0, "sub": "cpp_questions"}937{"thread_id": "uo95nq", "question": "Or is it only me? I just like the way it sounds. It's also a good replacement for cussing.", "comment": "There\u2019s a large enough Jewish population that some Yiddish words have slipped into the English language", "upvote_ratio": 6640.0, "sub": "AskAnAmerican"}938{"thread_id": "uo95nq", "question": "Or is it only me? I just like the way it sounds. It's also a good replacement for cussing.", "comment": "Sure do. I use a handful of other Yiddish phrases in daily life too. Schvitzing, schmuck, schlep, a few more. I think it's because of a combination of my parents being from the NYC area and watching a lot of Seinfeld as a kid.\n\nEdit: also putz, keister, schmendrick, mazel tov, and I use shekels as slang for money pretty often haha", "upvote_ratio": 2840.0, "sub": "AskAnAmerican"}939{"thread_id": "uo95nq", "question": "Or is it only me? I just like the way it sounds. It's also a good replacement for cussing.", "comment": "Username does not check out", "upvote_ratio": 840.0, "sub": "AskAnAmerican"}940{"thread_id": "uo9dtq", "question": "I have a branch I created last Friday and updated 1 line. Other programmers have pushed a bunch of code in master since. \n\nI want to do a PR to merge mine into master. Will this make any unintentional changes ?", "comment": "Pull master into your own branch and find out!", "upvote_ratio": 30.0, "sub": "AskProgramming"}941{"thread_id": "uo9g03", "question": "Heyo, if you have used Unity the game engine in the past, you know that you can build the same application for multiple platforms with the push of a button. Does anyone know about any other IDE or app that will help me perform similar feats? Preferably I would like the app to build an application for Mac, Windows, Android and iOs", "comment": "Thats not dependent on the IDE. It depends on the Language/Framework you are using and how you compile/interpret it. \n\nJava for example, with the JVM it is possible to run it on macOs, Windows, Linux, ...\n\nC# can be used multiplatform with .NET Core.\n\nAnd then there are other languages like Python, Kotlin, Go, ... which can also be used crossplatform, but only if you compile it properly for your target.\n\nThe IDE ist just a Tool, which supports you, taking care of alot of things you'd have to do manually else (for example compiling and running it).", "upvote_ratio": 60.0, "sub": "AskProgramming"}942{"thread_id": "uo9ifx", "question": "I am still new to C++ (just started this sem). I am supposed to create an airline reservation system for my final project. Although creating the project is not a problem for me where the outputnisbin cmd, I don't know ANYTHING about GUIs. We are being pushed to imolement GUI for our codes. Can anyone please help me?", "comment": "Qt is industry standard and it's the base of KDE on Linux.", "upvote_ratio": 170.0, "sub": "cpp_questions"}943{"thread_id": "uo9ifx", "question": "I am still new to C++ (just started this sem). I am supposed to create an airline reservation system for my final project. Although creating the project is not a problem for me where the outputnisbin cmd, I don't know ANYTHING about GUIs. We are being pushed to imolement GUI for our codes. Can anyone please help me?", "comment": "Check out Dear ImGui.", "upvote_ratio": 170.0, "sub": "cpp_questions"}944{"thread_id": "uo9ifx", "question": "I am still new to C++ (just started this sem). I am supposed to create an airline reservation system for my final project. Although creating the project is not a problem for me where the outputnisbin cmd, I don't know ANYTHING about GUIs. We are being pushed to imolement GUI for our codes. Can anyone please help me?", "comment": "If you want a traditional desktop UI you could use wxwidgets, qt, or gtk. They all have their own quirks.", "upvote_ratio": 140.0, "sub": "cpp_questions"}945{"thread_id": "uo9iuw", "question": "I landed a great entry level job, and everything seems perfect, the only problem is that I have been waiting 3 weeks for my offer letter. I have contacted my hiring manager about it and they said that there\u2019s some internal issues and that they are very sorry about the delay. It has been another week since then. What should I do? Is there anyway I can speed up the process or should I just be patient.", "comment": "Be patient and keep applying for other positions in the mean time. Don\u2019t put all your eggs in a basket. They don\u2019t owe you a position and you shouldn\u2019t feel like you owe them either. \n\nI would follow up once per week, after the 6th week or so, follow up every two weeks or just stop.", "upvote_ratio": 50.0, "sub": "ITCareerQuestions"}946{"thread_id": "uo9iuw", "question": "I landed a great entry level job, and everything seems perfect, the only problem is that I have been waiting 3 weeks for my offer letter. I have contacted my hiring manager about it and they said that there\u2019s some internal issues and that they are very sorry about the delay. It has been another week since then. What should I do? Is there anyway I can speed up the process or should I just be patient.", "comment": "Keep looking and interviewing, you're the backup hire and they have you on hold in case their #1 falls through.", "upvote_ratio": 40.0, "sub": "ITCareerQuestions"}947{"thread_id": "uoalnf", "question": "I've been applying to a lot of IT related jobs. Wasn't getting any interviews so I found a reddit post where this guy started using a cover letter.\n  Right after I used a cover letter, I got an interview for a state Drupal Web Developer position.  \n\nI did the interview on Monday. It was my first virtual interview and they asked  what was my fav project, what feature of a project you worked on was your  hardest, etc. I felt like it went well, and  I was a bit nervous tbh. Anyways, I thought it went well and they said they'll send me a coding challenge on TestDome.\n\nIt was 1.3 hours long and 4 questions. The first question was a simple \"replaceAtag\" where you replaced a href's link using JS's replace. The 2nd was simply adding a table with the DOM with the same amount of rows and cells of the last. The 3rd was a CSS one where you had to change the first element of a LI tag to the color red, and some other things.  4th one was to extract a \"privacy number\" like \"231-24-5712\" in PHP, and replace it with \"231/24/5712\" (hyphens could be used anywhere in a text). \n\nI completed the TestDome exam and today got a not selected email. I'm not sure what they want? \n\nIs there something I'm doing wrong, I felt so good throughout the process. Maybe too nervous during the interview? Any advice is appreciated, ty", "comment": "You can do everything right and not get hired because they just had a better \"feeling\" about someone else. Job hunting sucks. Rejection is the norm.", "upvote_ratio": 3580.0, "sub": "CSCareerQuestions"}948{"thread_id": "uoalnf", "question": "I've been applying to a lot of IT related jobs. Wasn't getting any interviews so I found a reddit post where this guy started using a cover letter.\n  Right after I used a cover letter, I got an interview for a state Drupal Web Developer position.  \n\nI did the interview on Monday. It was my first virtual interview and they asked  what was my fav project, what feature of a project you worked on was your  hardest, etc. I felt like it went well, and  I was a bit nervous tbh. Anyways, I thought it went well and they said they'll send me a coding challenge on TestDome.\n\nIt was 1.3 hours long and 4 questions. The first question was a simple \"replaceAtag\" where you replaced a href's link using JS's replace. The 2nd was simply adding a table with the DOM with the same amount of rows and cells of the last. The 3rd was a CSS one where you had to change the first element of a LI tag to the color red, and some other things.  4th one was to extract a \"privacy number\" like \"231-24-5712\" in PHP, and replace it with \"231/24/5712\" (hyphens could be used anywhere in a text). \n\nI completed the TestDome exam and today got a not selected email. I'm not sure what they want? \n\nIs there something I'm doing wrong, I felt so good throughout the process. Maybe too nervous during the interview? Any advice is appreciated, ty", "comment": "Don\u2019t feel down. When I was searching for my first job I nailed multiple technical interviews and coding assignments and felt great! Then the rejection came and I was always super bummed out. Just keep sticking with it, it will come soon!", "upvote_ratio": 470.0, "sub": "CSCareerQuestions"}949{"thread_id": "uoalnf", "question": "I've been applying to a lot of IT related jobs. Wasn't getting any interviews so I found a reddit post where this guy started using a cover letter.\n  Right after I used a cover letter, I got an interview for a state Drupal Web Developer position.  \n\nI did the interview on Monday. It was my first virtual interview and they asked  what was my fav project, what feature of a project you worked on was your  hardest, etc. I felt like it went well, and  I was a bit nervous tbh. Anyways, I thought it went well and they said they'll send me a coding challenge on TestDome.\n\nIt was 1.3 hours long and 4 questions. The first question was a simple \"replaceAtag\" where you replaced a href's link using JS's replace. The 2nd was simply adding a table with the DOM with the same amount of rows and cells of the last. The 3rd was a CSS one where you had to change the first element of a LI tag to the color red, and some other things.  4th one was to extract a \"privacy number\" like \"231-24-5712\" in PHP, and replace it with \"231/24/5712\" (hyphens could be used anywhere in a text). \n\nI completed the TestDome exam and today got a not selected email. I'm not sure what they want? \n\nIs there something I'm doing wrong, I felt so good throughout the process. Maybe too nervous during the interview? Any advice is appreciated, ty", "comment": "Had a similar experience where I did really well on the coding exam (Medium difficulty python questions) and answered everything correctly in the technical interview (Python questions) and didn't get the job. The worst part was the interviewer exchanged numbers with me which I thought was a good sign. After getting rejected I reached out to him for some advice on how I can improve myself but he ghosted me.", "upvote_ratio": 230.0, "sub": "CSCareerQuestions"}950{"thread_id": "uoaspm", "question": "Why do so many old people seem to LOVE and embrace today's trashy state of News Media? Why aren't they nostalgic for the classier good old days of Walter Cronkite?", "comment": "I speak for all old people and don't agree with your premise at all.", "upvote_ratio": 1080.0, "sub": "AskOldPeople"}951{"thread_id": "uoaspm", "question": "Why do so many old people seem to LOVE and embrace today's trashy state of News Media? Why aren't they nostalgic for the classier good old days of Walter Cronkite?", "comment": "Not sure I'd classify myself as \"old\" at 54, but I was just saying the same thing to someone the other day. Remember when the news actually, you know, reported the news? None of this virtue signalling, who-can-stir-the-pot the most crap.\n\nWhat's frightening is watching clips of the TV \"media\" in Russia about the war in Ukraine. You know what they look and sound like? US media outlets.  It's downright scary how similar their type of delivery is - report only on what the \"message\" is. Not reality. They're not reporting to *educate* people. It's delivering a message to *manipulate* people.\n\nI miss American media from 30 years ago. Small town newspapers, fewer conglomerates, actual beat reporters, no screaming talk-radio hosts, no Right or Left wing owned and controlled media and agendas.\n\nI know I'm looking through rose-colored glasses as there was always some partisanship, but now the \"media\" is in a full-on divisive war with American minds and hearts. Who is controlling the stories, the headlines? I fear it's more than just for $$$. It's for power. It's heading toward fascism here and it feels like a million ton train - you can't stop it.", "upvote_ratio": 1030.0, "sub": "AskOldPeople"}952{"thread_id": "uoaspm", "question": "Why do so many old people seem to LOVE and embrace today's trashy state of News Media? Why aren't they nostalgic for the classier good old days of Walter Cronkite?", "comment": "The excitement that comes with all the drama of 24 hour a day breaking news. My 84 year old mother has the tv on all day,  news and baseball.  It makes her happy to see shitty things happen to other people,  and she can gloat right along with the current batch of anchors.", "upvote_ratio": 1030.0, "sub": "AskOldPeople"}953{"thread_id": "uoazxh", "question": "My Planet Fitness app has a QR code page within the app. The problem is, the app is extremely slow, so I'd rather just have the QR code saved somewhere where I can easily access it. I'm not sure how to do this. Some ideas on approaches.\n\n1. Add a shortcut to either the Google Photo or the file in Drive. I haven't found a way to do this yet.\n2. I added the Planet Fitness card to Google wallet. However, non-payment cards take a lot of steps to access. Unlock phone, swipe down, swipe down again, tap GPay, tap Show all, tap Planet Fitness.\n3. Use a third party photo widget that shows only 1 photo. There doesn't seem to be a lot of highly rated third party photo widgets out there.\n\nAny other ideas, or ideas that build upon the approaches I listed? I can save image as my wallpaper, but I'd prefer not to do that.\n\nI have Pixel 5a running Android 12.", "comment": "After screenshot, share it to Google Keep, pin it to the top of keep, and use the keep widget. So unlock phone swipe to keep widget tap screenshot  to make it full screen.", "upvote_ratio": 30.0, "sub": "AndroidQuestions"}954{"thread_id": "uoazxh", "question": "My Planet Fitness app has a QR code page within the app. The problem is, the app is extremely slow, so I'd rather just have the QR code saved somewhere where I can easily access it. I'm not sure how to do this. Some ideas on approaches.\n\n1. Add a shortcut to either the Google Photo or the file in Drive. I haven't found a way to do this yet.\n2. I added the Planet Fitness card to Google wallet. However, non-payment cards take a lot of steps to access. Unlock phone, swipe down, swipe down again, tap GPay, tap Show all, tap Planet Fitness.\n3. Use a third party photo widget that shows only 1 photo. There doesn't seem to be a lot of highly rated third party photo widgets out there.\n\nAny other ideas, or ideas that build upon the approaches I listed? I can save image as my wallpaper, but I'd prefer not to do that.\n\nI have Pixel 5a running Android 12.", "comment": "Screenshot.\n\nThat's how I pay for my Dunkin coffee. \n\nDon't even bother using the app at all.", "upvote_ratio": 30.0, "sub": "AndroidQuestions"}955{"thread_id": "uoazxh", "question": "My Planet Fitness app has a QR code page within the app. The problem is, the app is extremely slow, so I'd rather just have the QR code saved somewhere where I can easily access it. I'm not sure how to do this. Some ideas on approaches.\n\n1. Add a shortcut to either the Google Photo or the file in Drive. I haven't found a way to do this yet.\n2. I added the Planet Fitness card to Google wallet. However, non-payment cards take a lot of steps to access. Unlock phone, swipe down, swipe down again, tap GPay, tap Show all, tap Planet Fitness.\n3. Use a third party photo widget that shows only 1 photo. There doesn't seem to be a lot of highly rated third party photo widgets out there.\n\nAny other ideas, or ideas that build upon the approaches I listed? I can save image as my wallpaper, but I'd prefer not to do that.\n\nI have Pixel 5a running Android 12.", "comment": "Just take a screenshot of it", "upvote_ratio": 30.0, "sub": "AndroidQuestions"}956{"thread_id": "uob0wr", "question": "These are NOT recommended, might I add?   But my parents always fell back on:\n\n​\n\nHot toddy (with whiskey) for a cold -- at any age, I remember having them when I was 8.\n\nWhisky on gums for teething\n\nBeer is the thing to settle an upset stomach (for my parents, anyway--they didn't try this on me til I was an adult).\n\nAny spirit dabbed onto a cut/scrape when rubbing alcohol wasn't available.\n\n​\n\nDid you or your parents have any others?  and are there any you still use?\n\n​\n\nYes, here, for hot toddys.   They work!  (adults only)", "comment": "My grandmother used Anisette on mine and my brother's gums when we were teething. When mom found out, she hit the roof. But apparently, we liked it better than Orajel so eventually dad convinced mom to give it a try. I guess mom was terrified we'd grow up to be alcoholics. \n\nEvery year on my grandmother's birthday, I drink a little shot of Anisette in her memory.", "upvote_ratio": 50.0, "sub": "AskOldPeople"}957{"thread_id": "uob0wr", "question": "These are NOT recommended, might I add?   But my parents always fell back on:\n\n​\n\nHot toddy (with whiskey) for a cold -- at any age, I remember having them when I was 8.\n\nWhisky on gums for teething\n\nBeer is the thing to settle an upset stomach (for my parents, anyway--they didn't try this on me til I was an adult).\n\nAny spirit dabbed onto a cut/scrape when rubbing alcohol wasn't available.\n\n​\n\nDid you or your parents have any others?  and are there any you still use?\n\n​\n\nYes, here, for hot toddys.   They work!  (adults only)", "comment": "Everclear will cure what ails you. It's also great for sterilizing wounds.", "upvote_ratio": 30.0, "sub": "AskOldPeople"}958{"thread_id": "uobdav", "question": "I\u2019m just really curious, and I didn\u2019t know where to ask it. What are the ads like?", "comment": "Depends on what you're watching and if the ads you're getting are targeted ads (usually only seen on streaming services or the Internet). \n\nThe most basic ads are for clothing / clothing stores, fast food, movies / TV show trailers, travel (usually domestic travel for other states), cars, etc.", "upvote_ratio": 110.0, "sub": "AskAnAmerican"}959{"thread_id": "uobdav", "question": "I\u2019m just really curious, and I didn\u2019t know where to ask it. What are the ads like?", "comment": "[Here's my favorite pharmaceutical commercial that aired constantly on TV a few years ago...pay attention to the side effects! You don't want to miss any!](https://www.youtube.com/watch?v=7VEZBVT_a3M)\n\n​\n\n[But this is probably one of the most iconic TV commercials](https://www.youtube.com/watch?v=FbQt8pYUY6Q) for anyone who used to watch a lot of basic cable back in the 00s and early 2010s", "upvote_ratio": 60.0, "sub": "AskAnAmerican"}960{"thread_id": "uobdav", "question": "I\u2019m just really curious, and I didn\u2019t know where to ask it. What are the ads like?", "comment": "I think my phone knows I\u2019m Latino bc out of nowhere every now and then I\u2019ll get ads in Spanish", "upvote_ratio": 40.0, "sub": "AskAnAmerican"}961{"thread_id": "uoboel", "question": "Like the title suggests, I want to play a mp3 file through my audio input so the other side can hear the audio, not my microphone. Does that make sense?\n\n​\n\nThis is going to be used in a twilio application where a caller can press a button and it switches their audio source from microphone to a audio file so they can leave automated voice mails.\n\n​\n\nIs this possible?", "comment": "I only needed this once and used a software called \"virtual audio cable\" for it.", "upvote_ratio": 30.0, "sub": "AskProgramming"}962{"thread_id": "uobqh0", "question": "I keep reading on Reddit that guys prefer ZERO makeup and they know what natural makeup is and still don't prefer it. If that's true, why do I get so much more male attention when I wear makeup?", "comment": "Men don't have a lot of experience with makeup. We see it or we don't. There's no grey area. It's kinda like fake boobs, or lip injections. We don't like them because they look bad when we notice them. If any of the above is done well, then we assume it's not been done", "upvote_ratio": 106940.0, "sub": "NoStupidQuestions"}963{"thread_id": "uobqh0", "question": "I keep reading on Reddit that guys prefer ZERO makeup and they know what natural makeup is and still don't prefer it. If that's true, why do I get so much more male attention when I wear makeup?", "comment": "In high school, I had a guy tell me that he liked how I was naturally beautiful and also that he liked that I didn\u2019t need makeup. While I was wearing a full face done in makeup. Black eye liner, heavy mascara, foundation, bronzer. I can only think that maybe because my lips were more of a nude colour, he thought that makeup means red lipstick or something.", "upvote_ratio": 73580.0, "sub": "NoStupidQuestions"}964{"thread_id": "uobqh0", "question": "I keep reading on Reddit that guys prefer ZERO makeup and they know what natural makeup is and still don't prefer it. If that's true, why do I get so much more male attention when I wear makeup?", "comment": "Men on Reddit are not a good sample. Even if that was the case and the survey says most men prefer no makeup, there's still the issue that your locality differs in opinion.", "upvote_ratio": 69540.0, "sub": "NoStupidQuestions"}965{"thread_id": "uoc14v", "question": "Hi programmers of reddit. I was wondering how common on-call duty is across companies. I have been speaking to a number of engineers across different companies and sizes. It seems like a reasonable setup but not everyone does it. The people who have to be on-call also hate it. Why?  \n\n\nWhat is your on-call process if you have one? How do you feel about it?Very curious to hear about your on-call experiences!\n\nAlso curious if you use any software to help with on-call? Seems standard practices exist but it's still such a pain for engineers.", "comment": "I think it's common in some areas (like developers of a web API or online service).\n\n> The people who have to be on-call also hate it. Why? \n\nCompletely kills your ability to relax, limits plans you can make, etc.", "upvote_ratio": 270.0, "sub": "AskProgramming"}966{"thread_id": "uoc14v", "question": "Hi programmers of reddit. I was wondering how common on-call duty is across companies. I have been speaking to a number of engineers across different companies and sizes. It seems like a reasonable setup but not everyone does it. The people who have to be on-call also hate it. Why?  \n\n\nWhat is your on-call process if you have one? How do you feel about it?Very curious to hear about your on-call experiences!\n\nAlso curious if you use any software to help with on-call? Seems standard practices exist but it's still such a pain for engineers.", "comment": "There's a time and a place.\n\nIt's something that in my 35 year career has been VERY often abused.  \n\nThey've got to give you some kind of concession for the availability.", "upvote_ratio": 120.0, "sub": "AskProgramming"}967{"thread_id": "uoc14v", "question": "Hi programmers of reddit. I was wondering how common on-call duty is across companies. I have been speaking to a number of engineers across different companies and sizes. It seems like a reasonable setup but not everyone does it. The people who have to be on-call also hate it. Why?  \n\n\nWhat is your on-call process if you have one? How do you feel about it?Very curious to hear about your on-call experiences!\n\nAlso curious if you use any software to help with on-call? Seems standard practices exist but it's still such a pain for engineers.", "comment": "I've worked as a consultant on a few projects where I was \"on call\"... Basically it was a worst case scenario when s*** hit the fan, just in case... For example when a big hit prod that directly impacted users upon deployment.\n\nI was always payed for time on call (hourly) and literally only did anything after hours once.\n\nWhile on salary gigs, it's basically been a, \"so you were in call 8 hours this week, so take Friday off\" kind of thing.\n\nThis is strictly anecdotal, but every place I've been has been respectful of the give and take, if that makes sense.", "upvote_ratio": 60.0, "sub": "AskProgramming"}968{"thread_id": "uoc2t3", "question": "To my understanding the if-let is only useful when you want to match only one thing and do something with it while ignoring everything else.\n\nThe pattern is much harder to read first of all and the main argument for it is that it is less boilerplate but from what I can see we are just adding one extra line if we go with the normal match expressions.\n\nSo I feel like for saving one line we are going with this bit of a weird syntax. I am sure with more experience the syntax will not feel weird but again the benefits seem very less here. The normal approach works just fine and is much more readable.\n\nExample -\n\n    fn main() {\n        let dice = 3;\n    \n        match dice {\n            3 => println!(\"Hello\"),\n            _ => (),\n        }\n    \n        if let 3 = dice {\n            println!(\"hello\")\n        }\n    }", "comment": "You are correct that if-let is for matching a single pattern but there is more to it.\n\nFirstly, I will admit that the syntax is weird in your example. The `if let 3 = dice` doesn't read very well but this is not what if-let was designed for. Your example should use `if dice == 3` so there is no reason for the if-let. Instead you would typically have something like `if let Some(foo) = bar` or `if let Ok(foo) = bar` which reads much better.\n\nSecondly, it may be one extra line in your example but if we try to do more things when a pattern is matched then we end up with three extra lines and code that is indented another level. Additionally the `_ => ()` is just visual noise. For example, compare this:\n\n    match bar {\n        Some(foo) => {\n            println!(\"one {}\", foo);\n            println!(\"two {}\", foo);\n        },\n        _ => (),\n    }\n\nTo this:\n\n    if let Some(foo) = bar {\n        println!(\"one {}\", foo);\n        println!(\"two {}\", foo); \n    }\n\nSo really what you choose depends on what you are doing but in this scenario the second option is much cleaner.", "upvote_ratio": 360.0, "sub": "LearnRust"}969{"thread_id": "uoc2t3", "question": "To my understanding the if-let is only useful when you want to match only one thing and do something with it while ignoring everything else.\n\nThe pattern is much harder to read first of all and the main argument for it is that it is less boilerplate but from what I can see we are just adding one extra line if we go with the normal match expressions.\n\nSo I feel like for saving one line we are going with this bit of a weird syntax. I am sure with more experience the syntax will not feel weird but again the benefits seem very less here. The normal approach works just fine and is much more readable.\n\nExample -\n\n    fn main() {\n        let dice = 3;\n    \n        match dice {\n            3 => println!(\"Hello\"),\n            _ => (),\n        }\n    \n        if let 3 = dice {\n            println!(\"hello\")\n        }\n    }", "comment": "Let if may be very nice with RAII object like a lock; instead of 3 you have the lock acquire, and if successful it will be automatically released at the end of the if.", "upvote_ratio": 50.0, "sub": "LearnRust"}970{"thread_id": "uoc2t3", "question": "To my understanding the if-let is only useful when you want to match only one thing and do something with it while ignoring everything else.\n\nThe pattern is much harder to read first of all and the main argument for it is that it is less boilerplate but from what I can see we are just adding one extra line if we go with the normal match expressions.\n\nSo I feel like for saving one line we are going with this bit of a weird syntax. I am sure with more experience the syntax will not feel weird but again the benefits seem very less here. The normal approach works just fine and is much more readable.\n\nExample -\n\n    fn main() {\n        let dice = 3;\n    \n        match dice {\n            3 => println!(\"Hello\"),\n            _ => (),\n        }\n    \n        if let 3 = dice {\n            println!(\"hello\")\n        }\n    }", "comment": "As you said, it's less boilerplate, and most of the time I think it reads nicer, especially when destructuring something. `if let Some(n) = m {}` reads to me as \"if this thing contains something, do that\".", "upvote_ratio": 40.0, "sub": "LearnRust"}971{"thread_id": "uocb0v", "question": "Original post:  https://www.reddit.com/r/cscareerquestions/comments/u9hl3q/plan_for_an_older_software_engineer_with_a_long/\n\nI just accepted a position as a mid level software engineer!  Thank you Reddit for all your advice.  I thought the whole process would have taken at least 6 months, but it only took a little over a month.  I applied to maybe 100+ positions, got around 10-15 interviews, received 3 offers and accepted an offer I could not refuse.  The pay is high, position is fully remote, and the engineering culture, on paper, seemed to fit me.  \n\nFor those interested, here are some things I did during this month. \n\nI coded everyday in Java.  I was rusty and had to get used to new features like streams, lambda functions, annotations and diamond operators.  The last time I worked, we were using java 4 or 5.\n\nI did leetcode enough so I could do most of the beginner problems.  I still cannot solve an intermediate problem.  I was able to pass the coding interviews given and all were beginner level.  \n\nBuilt a todo list webapp and microservice using plain servlets, jdbc, and jsp.  I initially tried using spring boot, but there was too much magic going on.  After I built my barebones app, I ported it over to spring boot with thymeleaf and hibernate.\n\nI finished the mooc.fi java 1 and 2 course.  Highly recommended.  \n\nI worked on the gilded rose and tennis refactoring problems on Emily Bache\u2019s github.  This helped me really understand and articulate the 4 pillars of OO,  the SOLID principles, and some design patterns.\n\nI applied to all the full stack/backend entry level and mid level jobs on indeed.  I didn\u2019t have time to optimize my LinkedIn, so I had no one contacting me on there.\n\nPracticed interviewed questions and took notes on where I needed to improve during real life interviews.  \n\nThings I wanted to do but didn\u2019t have time for:\n\nOptimize my resume\n\nOptimize my linkedin\n\nRelearn react to build a responsive todo list front end\n\nI hope this helps someone!", "comment": "Clearly muscle memory kicked in...", "upvote_ratio": 160.0, "sub": "CSCareerQuestions"}972{"thread_id": "uocb0v", "question": "Original post:  https://www.reddit.com/r/cscareerquestions/comments/u9hl3q/plan_for_an_older_software_engineer_with_a_long/\n\nI just accepted a position as a mid level software engineer!  Thank you Reddit for all your advice.  I thought the whole process would have taken at least 6 months, but it only took a little over a month.  I applied to maybe 100+ positions, got around 10-15 interviews, received 3 offers and accepted an offer I could not refuse.  The pay is high, position is fully remote, and the engineering culture, on paper, seemed to fit me.  \n\nFor those interested, here are some things I did during this month. \n\nI coded everyday in Java.  I was rusty and had to get used to new features like streams, lambda functions, annotations and diamond operators.  The last time I worked, we were using java 4 or 5.\n\nI did leetcode enough so I could do most of the beginner problems.  I still cannot solve an intermediate problem.  I was able to pass the coding interviews given and all were beginner level.  \n\nBuilt a todo list webapp and microservice using plain servlets, jdbc, and jsp.  I initially tried using spring boot, but there was too much magic going on.  After I built my barebones app, I ported it over to spring boot with thymeleaf and hibernate.\n\nI finished the mooc.fi java 1 and 2 course.  Highly recommended.  \n\nI worked on the gilded rose and tennis refactoring problems on Emily Bache\u2019s github.  This helped me really understand and articulate the 4 pillars of OO,  the SOLID principles, and some design patterns.\n\nI applied to all the full stack/backend entry level and mid level jobs on indeed.  I didn\u2019t have time to optimize my LinkedIn, so I had no one contacting me on there.\n\nPracticed interviewed questions and took notes on where I needed to improve during real life interviews.  \n\nThings I wanted to do but didn\u2019t have time for:\n\nOptimize my resume\n\nOptimize my linkedin\n\nRelearn react to build a responsive todo list front end\n\nI hope this helps someone!", "comment": "How long did it take you to do all of this?", "upvote_ratio": 110.0, "sub": "CSCareerQuestions"}973{"thread_id": "uocb0v", "question": "Original post:  https://www.reddit.com/r/cscareerquestions/comments/u9hl3q/plan_for_an_older_software_engineer_with_a_long/\n\nI just accepted a position as a mid level software engineer!  Thank you Reddit for all your advice.  I thought the whole process would have taken at least 6 months, but it only took a little over a month.  I applied to maybe 100+ positions, got around 10-15 interviews, received 3 offers and accepted an offer I could not refuse.  The pay is high, position is fully remote, and the engineering culture, on paper, seemed to fit me.  \n\nFor those interested, here are some things I did during this month. \n\nI coded everyday in Java.  I was rusty and had to get used to new features like streams, lambda functions, annotations and diamond operators.  The last time I worked, we were using java 4 or 5.\n\nI did leetcode enough so I could do most of the beginner problems.  I still cannot solve an intermediate problem.  I was able to pass the coding interviews given and all were beginner level.  \n\nBuilt a todo list webapp and microservice using plain servlets, jdbc, and jsp.  I initially tried using spring boot, but there was too much magic going on.  After I built my barebones app, I ported it over to spring boot with thymeleaf and hibernate.\n\nI finished the mooc.fi java 1 and 2 course.  Highly recommended.  \n\nI worked on the gilded rose and tennis refactoring problems on Emily Bache\u2019s github.  This helped me really understand and articulate the 4 pillars of OO,  the SOLID principles, and some design patterns.\n\nI applied to all the full stack/backend entry level and mid level jobs on indeed.  I didn\u2019t have time to optimize my LinkedIn, so I had no one contacting me on there.\n\nPracticed interviewed questions and took notes on where I needed to improve during real life interviews.  \n\nThings I wanted to do but didn\u2019t have time for:\n\nOptimize my resume\n\nOptimize my linkedin\n\nRelearn react to build a responsive todo list front end\n\nI hope this helps someone!", "comment": ">\tI worked on the gilded rose and tennis refactoring problems on Emily Bache\u2019s github.  This helped me really understand and articulate the 4 pillars of OO,  the SOLID principles, and some design patterns.\n\nFirst I\u2019m hearing about this GitHub - this looks really neat.", "upvote_ratio": 100.0, "sub": "CSCareerQuestions"}974{"thread_id": "uocb5c", "question": "Should I be entirely upfront from the beginning in interviews and say I was fired, even if they don't ask, or should I lie by omission?\n\nEven if I get through the interviews without revealing it, eventually if they were to offer a job, they would ask for references, at which point I would have to say I don't have one.\n\nIt's a dilemma because if I say at the beginning, they won't even give me a chance. If I say it at the end, they will get the impression that I am a liar.\n\nI was fired just due to not being able to keep up with tasks and deadlines. \n\nCan someone guide me on what to do?", "comment": "Just say they ran out of funding for my position and had to restructure", "upvote_ratio": 1690.0, "sub": "CSCareerQuestions"}975{"thread_id": "uocb5c", "question": "Should I be entirely upfront from the beginning in interviews and say I was fired, even if they don't ask, or should I lie by omission?\n\nEven if I get through the interviews without revealing it, eventually if they were to offer a job, they would ask for references, at which point I would have to say I don't have one.\n\nIt's a dilemma because if I say at the beginning, they won't even give me a chance. If I say it at the end, they will get the impression that I am a liar.\n\nI was fired just due to not being able to keep up with tasks and deadlines. \n\nCan someone guide me on what to do?", "comment": "Be honest but vague and hope for the best.", "upvote_ratio": 830.0, "sub": "CSCareerQuestions"}976{"thread_id": "uocb5c", "question": "Should I be entirely upfront from the beginning in interviews and say I was fired, even if they don't ask, or should I lie by omission?\n\nEven if I get through the interviews without revealing it, eventually if they were to offer a job, they would ask for references, at which point I would have to say I don't have one.\n\nIt's a dilemma because if I say at the beginning, they won't even give me a chance. If I say it at the end, they will get the impression that I am a liar.\n\nI was fired just due to not being able to keep up with tasks and deadlines. \n\nCan someone guide me on what to do?", "comment": "Companies almost never ask for references. Background checks almost never reveal why employment status changed. Just say it wasn\u2019t a good fit or other vague bullshit.", "upvote_ratio": 610.0, "sub": "CSCareerQuestions"}977{"thread_id": "uocctn", "question": "The phone just arrived, it won't boot up. I tried charging it, nothing shows on the screen. After 20 mintues, holding the power button doesn't do anything. Holding power and volume down causes it to vibrate once, nothing on the screen. Did I get a dud? Any possible fixes?", "comment": "Try letting it charge overnight. If it still won't come up, you've been had.", "upvote_ratio": 80.0, "sub": "AndroidQuestions"}978{"thread_id": "uocdej", "question": "How is it possible radio waves can potentially reach other planets years from now but I lose signal to my local radio station after driving 50 or so miles away from it?", "comment": "Signal power and a difference in decoding objectives.\n\nAll point-to-point communications are governed by the [signal-to-noise ratio](https://en.wikipedia.org/wiki/Signal-to-noise_ratio) at the decoder. EM waves follow the [inverse-square law](https://en.wikipedia.org/wiki/Inverse-square_law) in terms of signal power. For an intuitive understanding, consider omnidirectional transmission. The further the wave travels, the larger the radius of the sphere, and consequently the larger the area the signal power is divided over.\n\nThe initial signal power is determined by a number of factors as well, such as number of antenna, size of antenna, power fed to the antenna and so on. For a single antenna, the most common approximation used for the relationship between input and output power is [Frii's transmission equation](https://en.wikipedia.org/wiki/Friis_transmission_equation). \n\nThis brings us to [noise](https://en.wikipedia.org/wiki/Noise_(signal_processing\\)). This is what replaces the signal as you drive away. Noise is just a random signal that is ever-present in communications. One textbook, *Communication Systems* by Carlson, Crilly, and Rutledge, describes this noise as being due to the necessary random motion of particles at temperatures above absolute zero. This statement could be a post hoc rationalization though; it is not generally taught how to quantitatively predict the noise power for a given environment, only how to empirically calculate it.\n\nRegardless, the noise power will eventually eclipse the signal power as the signal power weakens. In AM/FM radio stations this presents as an increase in static.\n\nThis takes us to the (slight) mismatch in operational criteria. With the AM/FM radio station, you consider the system operational when you can discern the signal. This does not mean the signal can not be *detected* though or that the signal is not reaching you. Simply that its fidelity has fallen to the point where it should be treated with contempt and disgust. On the other hand, with signals reaching different planets, the general concern is more about detecting the signals than perfectly reconstructing them. \n\nThis may sound like a small difference but consider the following results for the transmission of secret information over a wiretap channel. When the security of the information is measured by the wiretapper's inability to *decode* the information, [the maximum amount of information that can be transmitted reliably is a linear function of the symbols sent (theorem 1, PDF)](https://ee.stanford.edu/~hellman/publications/29.pdf). On the other hand, when measured by the wiretapper's inability to *detect* the signal, [the maximum amount of information that can be transmitted reliably is sublinear function (square root) of the symbols sent (theorem 1.2, PDF)](https://arxiv.org/pdf/1202.6423.pdf).", "upvote_ratio": 260.0, "sub": "AskScience"}979{"thread_id": "uocdej", "question": "How is it possible radio waves can potentially reach other planets years from now but I lose signal to my local radio station after driving 50 or so miles away from it?", "comment": "There are a number of differences:\n\nYou:\n\n1. Obstructions, including the earth, in the way of distant signals\n2. Tiny antenna, possibly embedded in the frame of your car or windshield\n3. You care about the audio derived from the signal, which means receiving both the carrier wave and its more subtle modulations with sufficiently high fidelity\n\nAliens:\n\n1. Essentially direct line of sight to half of the planet at a given time\n2. Potentially a huge antenna or an antenna array listening\n3. The presence of a carrier wave is probably sufficient to make a claim of some extraterrestrial discovery, and that's easier to pick out of the noise than a more complex information encoding scheme layered on top of that", "upvote_ratio": 80.0, "sub": "AskScience"}980{"thread_id": "uocdej", "question": "How is it possible radio waves can potentially reach other planets years from now but I lose signal to my local radio station after driving 50 or so miles away from it?", "comment": "You lost the signal because your antenna is too small, the radio waves are still there.", "upvote_ratio": 30.0, "sub": "AskScience"}981{"thread_id": "uockmn", "question": "I see so many posts here about FAANG and TC, salary, stock options, where you should be at what point in your career, what program will get you there, how much leetcode to grind for interviews etc., but I don't see a lot about purpose and motivation beyond compensation. Is anyone here working on something they really believe in, that is making the world better: non-profit, medicine, education maybe? And not just the general tech-optimist TED-style speech about how all of this is making the world more connected, how crypto will end tyranny, blah blah blah.  I see so many folks trying so hard to get in at the FAANG companies and personally, I wouldn't work for three of them, simply on ethical grounds. Nothing against you if you do, but that isn't for me. Anyway, I'd love to hear anyone's advice or story about a more purpose-driven career path. What jobs have you had, or are you striving for, where you can make a difference where you feel it is needed?", "comment": "You have to understand that the vast majority of people on this sub are young kids who are still in college, and have yet to actually join the work-force. That's why there is so much FAANG worship.\n\nYou get over that real quick once you enter the work-force and realize there's a lot more to having a good career than aiming for FAANG. Better yet, you see that the most when you actually DO join a FAANG and realize it's nothing special.", "upvote_ratio": 490.0, "sub": "CSCareerQuestions"}982{"thread_id": "uockmn", "question": "I see so many posts here about FAANG and TC, salary, stock options, where you should be at what point in your career, what program will get you there, how much leetcode to grind for interviews etc., but I don't see a lot about purpose and motivation beyond compensation. Is anyone here working on something they really believe in, that is making the world better: non-profit, medicine, education maybe? And not just the general tech-optimist TED-style speech about how all of this is making the world more connected, how crypto will end tyranny, blah blah blah.  I see so many folks trying so hard to get in at the FAANG companies and personally, I wouldn't work for three of them, simply on ethical grounds. Nothing against you if you do, but that isn't for me. Anyway, I'd love to hear anyone's advice or story about a more purpose-driven career path. What jobs have you had, or are you striving for, where you can make a difference where you feel it is needed?", "comment": "The worst job I had was one that I joined \"for the greater good\", a biotech startup doing DNA sequencing to help physicians find early indicators of serious diseases.  I took a pay cut to join and left after 4 months.  Disorganized mess and toxic work environment.\n\nObviously not all companies trying to do good things are like that, just don't get tunnel vision like I did.  After all it's still just a job.", "upvote_ratio": 360.0, "sub": "CSCareerQuestions"}983{"thread_id": "uockmn", "question": "I see so many posts here about FAANG and TC, salary, stock options, where you should be at what point in your career, what program will get you there, how much leetcode to grind for interviews etc., but I don't see a lot about purpose and motivation beyond compensation. Is anyone here working on something they really believe in, that is making the world better: non-profit, medicine, education maybe? And not just the general tech-optimist TED-style speech about how all of this is making the world more connected, how crypto will end tyranny, blah blah blah.  I see so many folks trying so hard to get in at the FAANG companies and personally, I wouldn't work for three of them, simply on ethical grounds. Nothing against you if you do, but that isn't for me. Anyway, I'd love to hear anyone's advice or story about a more purpose-driven career path. What jobs have you had, or are you striving for, where you can make a difference where you feel it is needed?", "comment": "I thought I was part of the \"work to live\" crowd, but after only 1.5 years at my current company working on shit nobody on our team cares about,  and that'll obviously crash and burn some years down the line, I realized I really wasn't.\n\nI respect the people who can grind it out for the comp. But to me work consumes over half of your day, and if you don't enjoy what you make or the people you're working with then that is fucking misery.", "upvote_ratio": 180.0, "sub": "CSCareerQuestions"}984{"thread_id": "uocoi1", "question": "I\u2019ve never been there, so as I\u2019m watching this show I\u2019m curious how accurate the setting is.", "comment": "I think you'll find that most lakes, anywhere, are like this. \n\nThe houses *on* the lake are nice, those people are rich, but the houses across the street? Not so much. After all, they aren't lake front, they don't have a dock. \n\nEven more so for touristy areas.", "upvote_ratio": 420.0, "sub": "AskAnAmerican"}985{"thread_id": "uocoi1", "question": "I\u2019ve never been there, so as I\u2019m watching this show I\u2019m curious how accurate the setting is.", "comment": "Other parts of the Ozarks might be, but the Lake of the Ozarks is pretty touristy and has a lot of rich people vacation homes and boats.", "upvote_ratio": 270.0, "sub": "AskAnAmerican"}986{"thread_id": "uocoi1", "question": "I\u2019ve never been there, so as I\u2019m watching this show I\u2019m curious how accurate the setting is.", "comment": "I\u2019m from a couple hours north of the Ozarks (still in the same state) and honestly the whole state is trashy AF overall. Lake of the Ozarks is like the poor man\u2019s Florida or Cabo. Not a spring break destination for the rich and famous, but is good fun for the not-rich and unfamous. I have family in the Ozarks and they are the white-trashiest part of our family tree. Of course there are still nice parts and places, but overall Missouri is great at being trashy \n\nStay out of Missouri. (But I\u2019ll still get sad when other people talk shit about it because it\u2019s home).\n\nEdited for errors", "upvote_ratio": 100.0, "sub": "AskAnAmerican"}987{"thread_id": "uod3bq", "question": "Do you guys warn drivers about cops by blinking brights?", "comment": "no, but I mark them down on Google maps :)", "upvote_ratio": 6300.0, "sub": "AskAnAmerican"}988{"thread_id": "uod3bq", "question": "Do you guys warn drivers about cops by blinking brights?", "comment": "Cops or anything that would make driving conditions unsafe like seeing wildlife on the side of the road or a breakdown.", "upvote_ratio": 3540.0, "sub": "AskAnAmerican"}989{"thread_id": "uod3bq", "question": "Do you guys warn drivers about cops by blinking brights?", "comment": "Usually I blink brights at someone who has their brights on when they shouldn\u2019t. There are so few speed traps near me that I don\u2019t think I\u2019ve ever warned people about them. Even then they are usually marked it in Waze before I even get to them.", "upvote_ratio": 2530.0, "sub": "AskAnAmerican"}990{"thread_id": "uod4o0", "question": "Hi everyone!\n\nFirst up, I want to say thank you to all the amazing people in this forum: without some of the guides and advice on here, I wouldn't have been able to transition into a Help Desk position as I have. \n\nNow that I'm at this company, I have an incredible $3000 PD budget available to me. My goal is to become a system administrator and eventually explore a career in Cloud Engineering or DevOps. I couldn't seem to find anything like a reputable Bootcamp that you might see for careers in software engineering. I'd love to take something like a class or a bootcamp because i've found it's much tougher to self-study for certs than it is to learn in a class environment.\n\nDoes anyone have any advice or experience with similar bootcamps or opportunities for study? Would love any insight! Thanks very much.", "comment": "**Microsoft Learn.** Use a few hundred for two or three good certs.  **AWS**, two or three hundred there too. Bootcamps are bad idea in general. [https://www.cybrary.it/](https://www.cybrary.it/) Try for $50, if like then up to $300 for a year subscription.  Thoughts?", "upvote_ratio": 30.0, "sub": "ITCareerQuestions"}991{"thread_id": "uod4p0", "question": "I have been in the military for 7 years working as a welder/machinist. I have always been interested in starting something in the IT field but had a few bumps in the road of life. I'm now in a position in my life and career where my family and I are financially stable and I will be moving back to the mid west soon. I have been into contact with a cyber security friend of mine for years and he just got out and got a very nice well payed job (110k) and explained to me these were the things he would do if he had to start over.\n\n1.Enroll for a IT degree plan with WGU\n\n2. CompTIA A+ and CompTIA Network+ and CompTIA Sec +\n\n3. Now I'm able to focus on a specific area like Cybersecurity, Software engineering, Data Analytics, server admin., etc.\n\nI still have about 6-7 months before I get out so starting before I get out is ideal. I'm curious to see if anybody has any suggestions on what path I should take or any addition information that would help. Also, I know I will not be able to get that type of money for a long time. I just want to feel confident on how I approach this career change. Thanks!", "comment": "Start school before you get out. Use as much TA before you use the gi bill.\n\nKnow that you can file for unemployment while going to school on the gi bill. Talk to your schools counselor about that. \n\nHave a good resume. Military eval style writing ain't it. If you have to, pay someone to write you one. \n\nKnow that the rent checks you get from the gi bill is based on the zip code of your school. It may be more financially wise to pay out of pocket for wgu and save the gi bill for traditional school.\n\nI advise to go to a traditional school first if the school has a good IT program. One in my area did.\n\nDon't expect to learn alot from wgu, it's mostly there to quickly get a degree and certs. There's no real hands on. \n\nI transitioned after 10 years, if my dumbass can do it, you can too. I had one 3 month IT job getting 21 an hour then jumped to 70k after I got my ccna. You got this.", "upvote_ratio": 50.0, "sub": "ITCareerQuestions"}992{"thread_id": "uod4p0", "question": "I have been in the military for 7 years working as a welder/machinist. I have always been interested in starting something in the IT field but had a few bumps in the road of life. I'm now in a position in my life and career where my family and I are financially stable and I will be moving back to the mid west soon. I have been into contact with a cyber security friend of mine for years and he just got out and got a very nice well payed job (110k) and explained to me these were the things he would do if he had to start over.\n\n1.Enroll for a IT degree plan with WGU\n\n2. CompTIA A+ and CompTIA Network+ and CompTIA Sec +\n\n3. Now I'm able to focus on a specific area like Cybersecurity, Software engineering, Data Analytics, server admin., etc.\n\nI still have about 6-7 months before I get out so starting before I get out is ideal. I'm curious to see if anybody has any suggestions on what path I should take or any addition information that would help. Also, I know I will not be able to get that type of money for a long time. I just want to feel confident on how I approach this career change. Thanks!", "comment": "I cannot stress this enough:\n\nTake TAPS IMMEDIATELY. Along with that, look so see if you are still eligible for DoD Skill bridge. Do this ASAP.", "upvote_ratio": 30.0, "sub": "ITCareerQuestions"}993{"thread_id": "uod4p0", "question": "I have been in the military for 7 years working as a welder/machinist. I have always been interested in starting something in the IT field but had a few bumps in the road of life. I'm now in a position in my life and career where my family and I are financially stable and I will be moving back to the mid west soon. I have been into contact with a cyber security friend of mine for years and he just got out and got a very nice well payed job (110k) and explained to me these were the things he would do if he had to start over.\n\n1.Enroll for a IT degree plan with WGU\n\n2. CompTIA A+ and CompTIA Network+ and CompTIA Sec +\n\n3. Now I'm able to focus on a specific area like Cybersecurity, Software engineering, Data Analytics, server admin., etc.\n\nI still have about 6-7 months before I get out so starting before I get out is ideal. I'm curious to see if anybody has any suggestions on what path I should take or any addition information that would help. Also, I know I will not be able to get that type of money for a long time. I just want to feel confident on how I approach this career change. Thanks!", "comment": "If you want to gain as much knowledge as possible through a bootcamp, look into the VA's Vet Tech program. It's similar to the GI Bill, with monthly BAH pay outs. There's also universities that offer IT internships while you are a student. Start studying some of the modules in https://fedvte.usalearning.gov/. This can give you a solid start on InfoSec topics and knowledge. I would recommend to start studying Security+. If you ever want a government IT job, you'll need it. If you don't want to take classes before you get out,, buy a training module from https://www.udemy.com/. They always have a sale on their training videos. Get one for Sec+ and learn it. \n\nTry and get your CompTIA A+ and Sec+ before getting out. This will definitely help you get an entry level IT job you can work while doing WGU.", "upvote_ratio": 30.0, "sub": "ITCareerQuestions"}994{"thread_id": "uodeot", "question": "I'm in my second year of Helpdesk/Support in my career. \n\nJust curious, how long do employees stay at a company before moving on in IT?", "comment": "In IT i have found i can move my IT Career as fast as i can learn/grow. If you sit in your chair like a mushroom, you're not going anywhere. If you apply yourself to learn in your off-time (or even better, take a night shift when nothing is going on and learn while getting paid.) you can start moving pretty quick. \n\nI became a sys admin at 4 years, my boss is an IT Director at 6", "upvote_ratio": 150.0, "sub": "ITCareerQuestions"}995{"thread_id": "uodeot", "question": "I'm in my second year of Helpdesk/Support in my career. \n\nJust curious, how long do employees stay at a company before moving on in IT?", "comment": "At my first company, I stayed for almost 6 years, but I was still getting promotions every 6 months to 1.5 years.\n\nSince leaving, I've been job hopping about once a year, lots of good opportunities out there right now.", "upvote_ratio": 110.0, "sub": "ITCareerQuestions"}996{"thread_id": "uodeot", "question": "I'm in my second year of Helpdesk/Support in my career. \n\nJust curious, how long do employees stay at a company before moving on in IT?", "comment": "I stay 3-4 years and then evaluate whether I'm still enjoying the work and if the pay is up to where I want it to be.", "upvote_ratio": 60.0, "sub": "ITCareerQuestions"}997{"thread_id": "uodjfh", "question": "Sorry if the title is poorly worded. Earth is absolutely massive in comparison to say, the asteroid that killed the dinosaurs. But that same asteroid still caused a worldwide extinction event. Why are some asteroids world ending despite being so small in comparison to Earth?", "comment": "That one wasn't that small, it's guessed to have been about 12 km wide. That's the size of some small cities. It's not about the damage it does directly, rather, the soot and debris thrown up into the upper atmosphere that pretty much blocks out the sun. Look what one little volcano can do, now imagine the whole mountain slamming I to the ground at 30k miles epr hour.", "upvote_ratio": 100.0, "sub": "AskScience"}998{"thread_id": "uodjfh", "question": "Sorry if the title is poorly worded. Earth is absolutely massive in comparison to say, the asteroid that killed the dinosaurs. But that same asteroid still caused a worldwide extinction event. Why are some asteroids world ending despite being so small in comparison to Earth?", "comment": "Destroying the planet Earth and destroying the ecosystem of life on Earth are two radically different things. The former is a gigantic lump of rock and iron bound into a sphere by the force of its own gravity, requiring nothing from the outside universe to continue its own existence. The latter is a complex set of natural processes more-or-less at equilibrium with each other, which require a constant energy input and stable conditions to maintain stable operation. The biosphere is incredibly tiny and fragile compared to the planet at large, and exists at the thin, vulnerable boundary between thousands of miles of molten rock and the empty, endless vacuum of space.\n\nThe planet itself was basically unharmed by the Chicxulub asteroid impact. It wasn't thrown out of its orbit, or knocked on its side, and it didn't gain or lose any significant fraction of its mass. The worst damage was a (relatively) small hole in the crust which has since filled in, with the debris being kicked up into the high atmosphere and raining down as meteors across the planet. To the Earth, the asteroid impact was a minor dent that has mostly buffed out.", "upvote_ratio": 80.0, "sub": "AskScience"}999{"thread_id": "uodjfh", "question": "Sorry if the title is poorly worded. Earth is absolutely massive in comparison to say, the asteroid that killed the dinosaurs. But that same asteroid still caused a worldwide extinction event. Why are some asteroids world ending despite being so small in comparison to Earth?", "comment": "Yes, the earth is massive. But most life relies upon the thin atmosphere that clings around the earth. Even a small asteroid hitting the earth at high speed can put so much dust into the atmosphere that even the plants struggle to see the sun, and die.", "upvote_ratio": 50.0, "sub": "AskScience"}1000{"thread_id": "uodlcd", "question": "[Assembly] Can someone explain why the instruction AL := AL * 5 stores the hexadecimal of 750 in the AH register instead of 1250?", "comment": "It looks like a typo. \n\nIt says *5 on the first line but *3 on the second. \n\nI bet the professor was in the middle of making a small change from last year and got interrupted.\n\nBut even then it\u2019s screwed up (for x86) because AL is only 8 bits. Max value is FF", "upvote_ratio": 90.0, "sub": "AskComputerScience"}1001{"thread_id": "uodlcd", "question": "[Assembly] Can someone explain why the instruction AL := AL * 5 stores the hexadecimal of 750 in the AH register instead of 1250?", "comment": "It's been a while since I dabbled in assembly, but...this presentation looks wrong. Setting AL to anything would not change the contents of AH. Trying to understand 5\\*AL then 3\\*250, those are different things. If 3\\*250 is correct then AL <- 0xEE is correct, the 0x200 is lost because AL is 8 bits. It would not carry into AH unless you were doing arithmetic on [E]AX.", "upvote_ratio": 60.0, "sub": "AskComputerScience"}1002{"thread_id": "uodlcd", "question": "[Assembly] Can someone explain why the instruction AL := AL * 5 stores the hexadecimal of 750 in the AH register instead of 1250?", "comment": "It's pseudocode, so it's hard to know exactly what they intend it to do. The 8-bit x86 MUL instruction multiples AL by another byte value, and the result goes in the 16-bit AX.  So the pseudo-code as written does not directly correspond to real x86 instructions.\n\nMy guess is they meant to say AX := 5 \\* AL. Or it's a trick question, and you have to know that AH gets modified by an x86 multiply. In either case, the answer is wrong, and the result should be 07FE02EE.\n\nThe other possibility is the pseudocode is supposed to be some higher level language, and they mean for the high byte of the multiplication to be thrown away. And then the result should be 07FE2FEE. \n\nIn either case is their answer incorrect.", "upvote_ratio": 50.0, "sub": "AskComputerScience"}1003{"thread_id": "uodugr", "question": " Do lead devs and hiring managers really care about a Github page with tons of commits? It seems that a lot of job postings I see they're more interested in specific knowledge of frameworks, libraries, and their specific stack, personally, I think this is a mistake but this is what I've seen. Does a good Github page make up for a bad tech assessment, break in employment, or portfolio site?", "comment": "GitHubs and websites are great supplements but don\u2019t make up the meat of what you should be bringing to a job. Your experience in the tech stack they use is probably weighed more heavily than any of those other things.", "upvote_ratio": 50.0, "sub": "ITCareerQuestions"}1004{"thread_id": "uodvvi", "question": "how many of you consider yourselves conservative/right leaning and aren't religious?", "comment": "Compared to the average reddit poster, I'd probably considered conservative. I consider myself independent left leaning, but I absolutely despise both parties even if I typically agree with one more often than the other", "upvote_ratio": 970.0, "sub": "AskAnAmerican"}1005{"thread_id": "uodvvi", "question": "how many of you consider yourselves conservative/right leaning and aren't religious?", "comment": "I'm the inverse. Religious but not right wing.", "upvote_ratio": 420.0, "sub": "AskAnAmerican"}1006{"thread_id": "uodvvi", "question": "how many of you consider yourselves conservative/right leaning and aren't religious?", "comment": "Also right leaning/registered Republican and not religious. Was raised Christian though, and that's probably why I'm not religious anymore.\n\nBeing forced to go to church kinda turned me off from it.", "upvote_ratio": 320.0, "sub": "AskAnAmerican"}1007{"thread_id": "uoe13j", "question": "I guess this is just me wanting to vent. I had a good opportunity with a company that pays really well, and they wanted me to do a small coding challenge to test my skills before proceeding. Knowing this is unfortunately the norm, I reluctantly agreed and decided to take it, which they said would take me on average about 1.5 hours. \n\nSince this is a web-based company, I was thinking, oh, they probably want me to do some sort of PHP MVC thing. Nope. The test was for me to figure out some incredibly difficult mathematic algorithm, which was basically writing a function to figure out the amount of all possible solutions that you can get when adding any number of numbers in an array together to equal the total amount. For example, if you have the number 4 and pass in the numbers 1 and 2, you should get 3 total sums.\n\nBerate me if you want, but I could not figure this out, and they told me I could not use StackOverflow or any possible helpful links either. I personally do not see the real-world value of knowing this type of function at all, and I have never needed to run across something like that ever. Usually for something that heavily involved in an algorithm, I've been given the algorithm beforehand by someone much better at math than me, and I just convert it into a function. So, I just feel like I wasn't even given the opportunity to even show the work I can do with a lot of experience in their stack, just because I wasn't given a true aptitude test.\n\n​\n\nTLDR: I feel cheated out of a job because a pre-screen test was heavily algorithm/math based instead of being based off of the work the company actually does.", "comment": ">Usually for something that heavily involved in an algorithm, I've been given the algorithm beforehand by someone much better at math than me, and I just convert it into a function. So, I just feel like I wasn't even given the opportunity to even show the work I can do with a lot of experience in their stack, just because I wasn't given a true aptitude test.\n\nYou're not going to like this answer but you need to hear it in order to improve: you weren't cheated out of anything. They wanted to see how you solve problems that aren't immediately obvious to answer and you weren't able to. That *is* something you'll be expected to do on the job.\n\nWhen I give coding assessments sometimes more I'm interested in how a candidate approaches solving a problem than their answer. If they asked questions, talked through their reasoning, wrote pseudocode first, etc.\n\nI've hired people who didn't pass all the coding exercises because they were able to show how well they work with unknowns and under pressure. I'm not just interested in what you know how to do, I'm interested in how you would perform on my team. Knowing a framework or a stack is a given for most developers.", "upvote_ratio": 60.0, "sub": "AskProgramming"}1008{"thread_id": "uoe13j", "question": "I guess this is just me wanting to vent. I had a good opportunity with a company that pays really well, and they wanted me to do a small coding challenge to test my skills before proceeding. Knowing this is unfortunately the norm, I reluctantly agreed and decided to take it, which they said would take me on average about 1.5 hours. \n\nSince this is a web-based company, I was thinking, oh, they probably want me to do some sort of PHP MVC thing. Nope. The test was for me to figure out some incredibly difficult mathematic algorithm, which was basically writing a function to figure out the amount of all possible solutions that you can get when adding any number of numbers in an array together to equal the total amount. For example, if you have the number 4 and pass in the numbers 1 and 2, you should get 3 total sums.\n\nBerate me if you want, but I could not figure this out, and they told me I could not use StackOverflow or any possible helpful links either. I personally do not see the real-world value of knowing this type of function at all, and I have never needed to run across something like that ever. Usually for something that heavily involved in an algorithm, I've been given the algorithm beforehand by someone much better at math than me, and I just convert it into a function. So, I just feel like I wasn't even given the opportunity to even show the work I can do with a lot of experience in their stack, just because I wasn't given a true aptitude test.\n\n​\n\nTLDR: I feel cheated out of a job because a pre-screen test was heavily algorithm/math based instead of being based off of the work the company actually does.", "comment": "> Usually for something that heavily involved in an algorithm, I've been given the algorithm beforehand\n\nThat's all well and good unless you happen to be applying to be the guy that gives other people the algorithm.", "upvote_ratio": 30.0, "sub": "AskProgramming"}1009{"thread_id": "uoe2et", "question": "I recently got an offer at FAANG 1 and then a recruiter at FAANG 2 (which I'm more interested in working for) reached out to me. I told the F2 recruiter about my F1 offer deadline (was like two weeks away at this point) and he said he would jump me straight to the onsite. Passed it and received the verbal offer at F2, but with the caveat they want me to have 6 more months of industry experience before moving onto team matching. Then after team matching I would receive the official offer letter. So essentially asking me to work at F1 for 6 months then leave. Is this normal? Definitely excited about both opportunities, especially the second, but find what they're asking of me pretty strange. If anyone has advice for how to deal with this situation it would be greatly appreciated. This will be my first role in the industry and could use some advice for how to proceed.\n\n​\n\nEdit: Should have clarified earlier but I have no industry experience, not even internships", "comment": "You sure they\u2019re not telling you to reapply in 6 months? Cuz this is some dumb shit.", "upvote_ratio": 7080.0, "sub": "CSCareerQuestions"}1010{"thread_id": "uoe2et", "question": "I recently got an offer at FAANG 1 and then a recruiter at FAANG 2 (which I'm more interested in working for) reached out to me. I told the F2 recruiter about my F1 offer deadline (was like two weeks away at this point) and he said he would jump me straight to the onsite. Passed it and received the verbal offer at F2, but with the caveat they want me to have 6 more months of industry experience before moving onto team matching. Then after team matching I would receive the official offer letter. So essentially asking me to work at F1 for 6 months then leave. Is this normal? Definitely excited about both opportunities, especially the second, but find what they're asking of me pretty strange. If anyone has advice for how to deal with this situation it would be greatly appreciated. This will be my first role in the industry and could use some advice for how to proceed.\n\n​\n\nEdit: Should have clarified earlier but I have no industry experience, not even internships", "comment": "You don't have an offer from F2.\n\nIf F1 is an acceptable offer, take it (and tell F2 you're taking it as a permanent thing, not for their six month drill). You may end up liking it. If you end up not liking it, you'll re-evaluate it and maybe consider F2. I say maybe because their behavior is very strange indeed. A large company would have zero problems w/ keeping you for those six month, if they are interested. Maybe at a lower level to be reconsidered after that time. Telling somebody to go somewhere else for six months is unheard of. But equally unheard of for a recruiter not being able to say \"the team was not convinced so we're not able to extend you an offer at this time\" so meh.", "upvote_ratio": 2970.0, "sub": "CSCareerQuestions"}1011{"thread_id": "uoe2et", "question": "I recently got an offer at FAANG 1 and then a recruiter at FAANG 2 (which I'm more interested in working for) reached out to me. I told the F2 recruiter about my F1 offer deadline (was like two weeks away at this point) and he said he would jump me straight to the onsite. Passed it and received the verbal offer at F2, but with the caveat they want me to have 6 more months of industry experience before moving onto team matching. Then after team matching I would receive the official offer letter. So essentially asking me to work at F1 for 6 months then leave. Is this normal? Definitely excited about both opportunities, especially the second, but find what they're asking of me pretty strange. If anyone has advice for how to deal with this situation it would be greatly appreciated. This will be my first role in the industry and could use some advice for how to proceed.\n\n​\n\nEdit: Should have clarified earlier but I have no industry experience, not even internships", "comment": "I\u2019ve never heard that before. Are you working now?\n\nI wouldn\u2019t place much value on a verbal offer that\u2019s 6 months away, when we don\u2019t know what the economy will be like then.\n\nSeems like you really only have one option. Tell FAANG 2 that it\u2019s now or never. If they give you a written offer you\u2019ll accept it. Otherwise you\u2019ll take FAANG 1\u2019s offer and reevaluate in 6 months.", "upvote_ratio": 1190.0, "sub": "CSCareerQuestions"}1012{"thread_id": "uoe8cz", "question": "So this is kinda a gross and gruesome question, but it has been bugging me for a while.\n\nWhen we die, we decompose. This is because we are basically eaten by microorganisms, bugs, and scavengers. Like if you died on Mars, you wouldn't decompose because they don't have those organisms there.\n\nSo, how do thee decomposes \"know\" when to start decomposing you? Cause like, as far as I am aware, my eye doesn't feel like it's rotting.\n\nThe answer I came up with is that the decomposers don't \"know\". They constantly are eating away at us, but we just regenerate/heal at a faster rate. When we die we stop healing and therefore we decompose.\n\nIf that's the case, are we constantly rotting from the moment of birth, slowly being eaten away and decomposed our entire lives? Yikes if so but i am not really sure how it could be another way. What are your thoughts? Am I on the right track?", "comment": "Your own initial answer is mostly correct. Organisms involved in decomposition don\u2019t \u201cknow\u201d anything and are opportunists. But they aren\u2019t simply \u201ceating away at us\u201d all the time. We (and most organisms that decomposers eat) have active systems that prevent them from starting that process in the first place. Barriers such as skin keep them out initially. Any \u201choles\u201d we have are usually areas that can slough off mucous or are semi inhospitable to them. Finally, immune systems internally will keep them at bay. But at an organisms death, these systems stop working and the decomposers now are simply able to have unimpeded access.", "upvote_ratio": 50.0, "sub": "AskScience"}1013{"thread_id": "uoe8eo", "question": "Let's say I have a dirty glass and a clean reservoir of water with a tap. I want to rinse my glass with it. What is the minimum flow rate to make sure no bacteria can make it back into the clean supply?", "comment": "Typical pathogenic bacteria have motility velocity in the 10-50\u03bcM/sec range. So any flowing tap would be far too fast for bacteria to ever swim up the stream.\n\nThe main concern would be contaminating the faucet and having biofilm growth and having water with no residual free chlorine.\n\nELI5: much, much more common for a dirty faucet to contaminate water/glass.", "upvote_ratio": 100.0, "sub": "AskScience"}1014{"thread_id": "uoeddc", "question": "I work in a factory and we have an in house developed software system for managing our quality testing data. It recently was changed to prompt entry of the testers initials for each box filled and I'm not high up enough to argue that it's too frustrating to be practical.\n\nI can suggest a better system to replace it though, and the only one I've pitched that's gained any traction is having a webcam set up at each station and something like a QR code on each testers helmet with a unique ID that's scanned while they are in front of the computer and logs who entered the test automatically.\n\non a scale of \"easy to implement\" to \"totally insane\", how crazy an ask is this?\n\nI'd also love to hear any ideas to improve this or make it easier to implement.", "comment": "You might want to look into RFID cards or phone verification. There are companies that specialize in security authentication for everything from doors to elevators to vehicles. I don't have any experience actually working hands-on with implementing these technologies but I have used them in the past. I looked online and found this company but you need to get the prices quoted. https://www.getkisi.com/", "upvote_ratio": 40.0, "sub": "AskProgramming"}1015{"thread_id": "uoeddc", "question": "I work in a factory and we have an in house developed software system for managing our quality testing data. It recently was changed to prompt entry of the testers initials for each box filled and I'm not high up enough to argue that it's too frustrating to be practical.\n\nI can suggest a better system to replace it though, and the only one I've pitched that's gained any traction is having a webcam set up at each station and something like a QR code on each testers helmet with a unique ID that's scanned while they are in front of the computer and logs who entered the test automatically.\n\non a scale of \"easy to implement\" to \"totally insane\", how crazy an ask is this?\n\nI'd also love to hear any ideas to improve this or make it easier to implement.", "comment": "> on a scale of \"easy to implement\" to \"totally insane\", how crazy an ask is this?\n\nI'd say the real question is, are you trying to solve a *technical* problem or a *human compliance* problem?  If your quality testers (!) aren't able to reliably fill-in their initials into a box, how can you expect them to wear a correctly marked helmet and show it to the camera?\n\nThe technical side is easy though.  Look at the OpenCV project for general computer vision stuff, and QR decoders on github for the code scanning specifics.", "upvote_ratio": 30.0, "sub": "AskProgramming"}1016{"thread_id": "uoej0z", "question": "Hello everyone! So I\u2019m currently in the process of getting my bachelors degree. Well, I haven\u2019t started yet. Currently waiting for fall semester to start. Now this is where I need some help with everyone already in the IT field. I had the choice of getting my bachelors in Management Information Systems OR Computer Networks and Cybersecurity. I honestly have no professional IT experience other than building my own PCs for fun and use. I currently run my own business, so I do like the business side also. The one thing I am noticing though is that ALL jobs are asking for RIDICULOUS experience. In either IS or cybersecurity. Everyone wants 5+ years experience or sometimes even more. Makes me feel like it would be impossible to land a job in either lol. What\u2019s everyone\u2019s experience? What field of IT are you in and how did you get in? Any advice or tips in getting in the field? \n\nThanks for any advice. I hope to learn and hopefully figure out which direction I want to go in.", "comment": "Currently just graduated with my Bachelors in Information Systems and CyberSecurity lol. \n\nIn short, it does not matter. No hiring manager is going to look at your degree and hire or not hire you based off of your major. As long as it's tech related, you're set.\n\nYou can decide to be a software dev with a cyber security degree or be a network engineer with an Infosys degree.\n\nDo whatever interests you. If you end up going for your Master's, that is when you then may need to be specific about your major; as the degree is likely for promotional purposes.", "upvote_ratio": 50.0, "sub": "ITCareerQuestions"}1017{"thread_id": "uoej0z", "question": "Hello everyone! So I\u2019m currently in the process of getting my bachelors degree. Well, I haven\u2019t started yet. Currently waiting for fall semester to start. Now this is where I need some help with everyone already in the IT field. I had the choice of getting my bachelors in Management Information Systems OR Computer Networks and Cybersecurity. I honestly have no professional IT experience other than building my own PCs for fun and use. I currently run my own business, so I do like the business side also. The one thing I am noticing though is that ALL jobs are asking for RIDICULOUS experience. In either IS or cybersecurity. Everyone wants 5+ years experience or sometimes even more. Makes me feel like it would be impossible to land a job in either lol. What\u2019s everyone\u2019s experience? What field of IT are you in and how did you get in? Any advice or tips in getting in the field? \n\nThanks for any advice. I hope to learn and hopefully figure out which direction I want to go in.", "comment": "You can easily be hired into the federal workforce fresh out of college. Information Security and Cybersecurity are much needed in the federal govt. Personally, I'd choose Cybersecurity.\n\nGo to [USAJobs.gov](https://USAJobs.gov) and search for 2210. It's the Federal job code for all disciplines of Information Technology Specialist no matter if it's Customer Support, Software Support, Cybersecurity, Cloud, etc. You'll want to look for \"Recent grad\" or \"Pathways\" postings.", "upvote_ratio": 30.0, "sub": "ITCareerQuestions"}1018{"thread_id": "uoek5z", "question": "Context:\nI\u2019m currently a Sophomore in college studying for Computer Science with an emphasis on Cybersecurity. As far as job experience , I have worked at a grocery store for a little while and am hoping to gain work experience in IT.\n\nI\u2019ve been applying for IT support/Help desk positions on Indeed and haven\u2019t had much success. I assume the issue is my resume and unrelated work experience in the field. To remedy this and gain knowledge in IT, I figured earning either the A+ or Network+ certification would be the best place to start.\n\nMy question is, without having much experience in IT at the moment but still wanting to land a decent job, which cert would it be wise to start with?\n\nAny advice would really help, thanks :)", "comment": "If you\u2019re a CS major, there\u2019s no real reason to pay for and take the A+ exam. I\u2019m sure you know what WiFi and RAM are. You can just brush up on any concepts you\u2019re unfamiliar with online for free. \n\nNetworking is its own beast and if you\u2019re interested, try for something like the CCNA. Networking is meaty and there\u2019s great resources online like Professor Messer (he covers Network+) and I\u2019m sure you can take a Networking class in your school curriculum too.", "upvote_ratio": 50.0, "sub": "ITCareerQuestions"}1019{"thread_id": "uoek6l", "question": "I am a 3x survivor of suicide. AMA", "comment": "Congratulations.\n\nr/FailedSuccessfully", "upvote_ratio": 310.0, "sub": "AMA"}1020{"thread_id": "uoek6l", "question": "I am a 3x survivor of suicide. AMA", "comment": "i\u2019m also a 3 time survivor, i pray for you <3 our minds our complex and scary chambers of emotion", "upvote_ratio": 260.0, "sub": "AMA"}1021{"thread_id": "uoek6l", "question": "I am a 3x survivor of suicide. AMA", "comment": "Have you beaten those thoughts/feeling better?", "upvote_ratio": 180.0, "sub": "AMA"}1022{"thread_id": "uoelkj", "question": "So, I grew up in a very Czech area of Nebraska. Most people would say they were \"Bohemian\" as Bohemia is part of the Czech Republic, or Bohunk. However, I was told by many that Bohunk was more or less an offensive term for someone from Eastern Europe. So has anyone else heard this term, and if so do you think its offensive. Honestly, I grew up with the word and while it wasn't common, I never found it offensive. It just seemed kind of old timey, as I first heard it in Willa Cather novels (for those who don't know, she's probably the most notable writer from Nebraska, and grew up in a rural town called Red Cloud, which has a lot of Czechs and a lot of her novels deal with immigrant life, and while I'm sure there are issues, its interesting that a white lady born in Virginia wrote compassionately about such immigrants at a time when they were sometimes not kindly treated) and sometimes I still say it to describe myself as I'm half \"bohunk\" and half German.", "comment": "I would have thought bohunk was a weird variant on podunk lol", "upvote_ratio": 430.0, "sub": "AskAnAmerican"}1023{"thread_id": "uoelkj", "question": "So, I grew up in a very Czech area of Nebraska. Most people would say they were \"Bohemian\" as Bohemia is part of the Czech Republic, or Bohunk. However, I was told by many that Bohunk was more or less an offensive term for someone from Eastern Europe. So has anyone else heard this term, and if so do you think its offensive. Honestly, I grew up with the word and while it wasn't common, I never found it offensive. It just seemed kind of old timey, as I first heard it in Willa Cather novels (for those who don't know, she's probably the most notable writer from Nebraska, and grew up in a rural town called Red Cloud, which has a lot of Czechs and a lot of her novels deal with immigrant life, and while I'm sure there are issues, its interesting that a white lady born in Virginia wrote compassionately about such immigrants at a time when they were sometimes not kindly treated) and sometimes I still say it to describe myself as I'm half \"bohunk\" and half German.", "comment": "I\u2019ve never heard that word.", "upvote_ratio": 240.0, "sub": "AskAnAmerican"}1024{"thread_id": "uoelkj", "question": "So, I grew up in a very Czech area of Nebraska. Most people would say they were \"Bohemian\" as Bohemia is part of the Czech Republic, or Bohunk. However, I was told by many that Bohunk was more or less an offensive term for someone from Eastern Europe. So has anyone else heard this term, and if so do you think its offensive. Honestly, I grew up with the word and while it wasn't common, I never found it offensive. It just seemed kind of old timey, as I first heard it in Willa Cather novels (for those who don't know, she's probably the most notable writer from Nebraska, and grew up in a rural town called Red Cloud, which has a lot of Czechs and a lot of her novels deal with immigrant life, and while I'm sure there are issues, its interesting that a white lady born in Virginia wrote compassionately about such immigrants at a time when they were sometimes not kindly treated) and sometimes I still say it to describe myself as I'm half \"bohunk\" and half German.", "comment": "I remember it as like... An 80s word that they only ever used in some movies (actually the only one i can think of is Adventures in Babysitting) and no one ever really said it. \n\nBut it meant like \"meathead\", muscley guy maybe a bit dumb?\n\nNothing about it meant a specific ancestry.", "upvote_ratio": 110.0, "sub": "AskAnAmerican"}1025{"thread_id": "uof2ld", "question": "Hello, lately i was wondering what's the future of our DBA friends.\n\nI see a lot of db offers in the cloud and the world is heading always more to everything as a service on cloud. Without the need of setting up your own db (and some companies even today don't have anyone competent in db... like i have to set up it here lol) what kind of job path will those guys take?\n\nMaybe something in the data/machine learning field? Mixing data knowledge with python magics?\n\nWill they be required for a period as ''experts'' (?) of cloud migrations? (but i bet it will be really few spots)\n\nLet me know your impressions!", "comment": "There is still need for DBA in the cloud. Configuration/integration/table maintenance/security/yelling at people to write better queries to keep credit burn to minimum is all there\u2026just sprinkled with learning cloud platforms\u2026", "upvote_ratio": 100.0, "sub": "ITCareerQuestions"}1026{"thread_id": "uof2ld", "question": "Hello, lately i was wondering what's the future of our DBA friends.\n\nI see a lot of db offers in the cloud and the world is heading always more to everything as a service on cloud. Without the need of setting up your own db (and some companies even today don't have anyone competent in db... like i have to set up it here lol) what kind of job path will those guys take?\n\nMaybe something in the data/machine learning field? Mixing data knowledge with python magics?\n\nWill they be required for a period as ''experts'' (?) of cloud migrations? (but i bet it will be really few spots)\n\nLet me know your impressions!", "comment": "Not all databases are moving to the cloud. We have data centers that host petabytes of data. Those are not going anywhere. The cost to move and keep those things in the cloud is astronomical and makes no sense to touch them.", "upvote_ratio": 40.0, "sub": "ITCareerQuestions"}1027{"thread_id": "uof2xr", "question": "If you\u2019re exposed to poison, you\u2019re poisoned. If you\u2019re exposed to venom, you are _________???", "comment": "Fucked", "upvote_ratio": 4630.0, "sub": "ask"}1028{"thread_id": "uof2xr", "question": "If you\u2019re exposed to poison, you\u2019re poisoned. If you\u2019re exposed to venom, you are _________???", "comment": "Envenomed.", "upvote_ratio": 2160.0, "sub": "ask"}1029{"thread_id": "uof2xr", "question": "If you\u2019re exposed to poison, you\u2019re poisoned. If you\u2019re exposed to venom, you are _________???", "comment": "now in the marvel universe", "upvote_ratio": 1240.0, "sub": "ask"}1030{"thread_id": "uofokm", "question": "I\u2019m a city boy, born and raised. But, lately, prices have become too high here. I have seen some small towns that are affordable and would reasonably fit my lifestyle. What was the biggest adjustment?", "comment": "I'd argue moving to a smaller town or city isn't exactly living the rural lifestyle. If you're living \"in town\" , you still can live somewhat an urban lifestyle. A town as small as 2,000 may have a full grocery store, a few restaurants, at least one bar. You'll have some level of urban amenities, just less of them.\n\nThat's different than living in the sticks where there's nothing around except maybe a Dollar General.", "upvote_ratio": 260.0, "sub": "AskAnAmerican"}1031{"thread_id": "uofokm", "question": "I\u2019m a city boy, born and raised. But, lately, prices have become too high here. I have seen some small towns that are affordable and would reasonably fit my lifestyle. What was the biggest adjustment?", "comment": "Yes, about a year and a half ago.\n\nThe biggest adjustment has been getting used to not having access to, well, everything. Stores have limited selection. Want a new kitchen faucet? The hardware store has 3 to choose from. \n\nIt was a move I wanted to make, I don\u2019t miss living in the city at all. I get into the Detroit metro about once a month, I can get my fix over a weekend then return to the woods.", "upvote_ratio": 220.0, "sub": "AskAnAmerican"}1032{"thread_id": "uofokm", "question": "I\u2019m a city boy, born and raised. But, lately, prices have become too high here. I have seen some small towns that are affordable and would reasonably fit my lifestyle. What was the biggest adjustment?", "comment": "City to small town to rural farm country and back to city. \n\nThere's less to go to and it's further away the more rural you get. Jobs are harder to find because there are fewer of them. Less places open 24 hours. Things tend to look and be less modern. Cell signal and Internet isn't as good, but it's a lot better than it used to be in many places. You may have to pay for trash pickup separately rather than as part of your water bill. Possibly on septic rather than city sewer. Maybe well water rather than from a reservoir. Generally fewer city services, sometimes including emergency services. It can be a much longer ride to a hospital or even doctor. More and larger animals out and about. The night sky looks more pretty. Less traffic, unless it's harvest season and you're sharing the road with farm equipment. Generally less code enforcement about what you do with your house and yard.", "upvote_ratio": 140.0, "sub": "AskAnAmerican"}1033{"thread_id": "uog1qr", "question": "What do American people think on who actually defeated Nazi Germany, America or the Soviets?", "comment": "Does it have to be an either/or? Seems like that would produce useless and oversimplified answers that devolve into uneducated chest-beating.", "upvote_ratio": 1540.0, "sub": "AskAnAmerican"}1034{"thread_id": "uog1qr", "question": "What do American people think on who actually defeated Nazi Germany, America or the Soviets?", "comment": "\"WWII was won with British intelligence, American steel and Russian blood\"", "upvote_ratio": 1430.0, "sub": "AskAnAmerican"}1035{"thread_id": "uog1qr", "question": "What do American people think on who actually defeated Nazi Germany, America or the Soviets?", "comment": "The US, UK, USSR all made huge contributions. The soviets wouldn't have won on their own. Neither would anyone else.", "upvote_ratio": 400.0, "sub": "AskAnAmerican"}1036{"thread_id": "uog1ug", "question": "For example when I burn anything like paper, it gets reduced to ashes. I want to know how this process works. Where all the missing mass go? Smoke? Where the black color came from? Also I wonder why this process can't be reversed easily. When I soak clothes with water, I can get it dry again after a while. But if I burn clothes, it will be near impossible for it to return to its original form.", "comment": "Burning is a chemical reaction. \n\nGoing from wet to dry is just a phase change.\n\nThey\u2019re not really comparable at all.\n\nThe chemical reaction of burning changes the matter being burnt on a molecular level. It turns that matter into something chemically different. \n\nCommon by products of burnin carbon-rich materials are gaseous carbon monoxide and carbon dioxide. The solid matter gets rearranged into a different compound that is also in a different phase of matter. \n\nIf you take one log of wood and burn it, you\u2019re actually subdividing into several different byproducts, some solid, some gas, and any liquid present boils off. In the end every atom still exists, they\u2019ve just been dramatically spread out in the surrounding area.", "upvote_ratio": 60.0, "sub": "AskScience"}1037{"thread_id": "uog1ug", "question": "For example when I burn anything like paper, it gets reduced to ashes. I want to know how this process works. Where all the missing mass go? Smoke? Where the black color came from? Also I wonder why this process can't be reversed easily. When I soak clothes with water, I can get it dry again after a while. But if I burn clothes, it will be near impossible for it to return to its original form.", "comment": "Don't forget something like steel wool, which is oxidized as it burns and actually gains mass.  The oxygen bonds with the iron and if you have it on a scale as it burns you will see the weight go up, albeit slightly.", "upvote_ratio": 30.0, "sub": "AskScience"}1038{"thread_id": "uog8c7", "question": "Right how I\u2019ve been stuck on one specific sector of beginners JavaScript on the Odin project, I\u2019m considering supplementing it with FCC, but I see so many negative reviews that\u2019s I\u2019m hesitant to give it a shot. What\u2019s your honest opinion of FCC?", "comment": "Honest opinion is dont be afraid to give a resource a shot just because it didnt work for someone else.  There are so many resources out there, and not everyone learns or likes to learn in the same way....one persons best of all time can be anothers worst experience.\n\nThat being said, Im a huge supporter of FCC, cause it was the first thing I came across that actually helped me learn and put me on the track that helped me get to where I am now.  The reason I love it, is the same reason some people dont. FCC doesnt hold your hand and do everything for you. Its not like following a tutorial or just plugging in whatever code it tells you to. It gives you a goal problem to solve, and is layed out in a way you have to do read docs and do research so when you complete a task, you actually understand what it is youre doing.  \n\nAlso, the community is engaging and super welcoming and helpful...I made a goal when I started to give back, because I got so much help along the way. And I felt amazing the first time I was able to help someone else out.  Teaching is also a great way to learn, because I would often look things up to get a better understanding while trying to help someone else out with a problem.  \n\nIm now coming up on 3 years in the industry, and literally.....everyone who asks about my path gets an earful about FCC, cause it really made a huge impact and means so much to me.  And doesnt bother me at all if someone else totally hates it.  Thats why there are so many different resources, and also why FCC encourages people to get their hands on other resources too...no one source is going to make everything you need to learn click in place.  \n\nSo yeah, thats my opinion....give it a try, either you will like it, or you wont. But just cause someone else loves something doesnt mean its your only hope and feel discouraged if youre struggling, and just cause someone else hates it doesnt mean you should feel awkward for thriving. But you wont know unless you try....and I kinda feel like its worth it to at least try.", "upvote_ratio": 3630.0, "sub": "LearnProgramming"}1039{"thread_id": "uog8c7", "question": "Right how I\u2019ve been stuck on one specific sector of beginners JavaScript on the Odin project, I\u2019m considering supplementing it with FCC, but I see so many negative reviews that\u2019s I\u2019m hesitant to give it a shot. What\u2019s your honest opinion of FCC?", "comment": "I think their Youtube videos are some of the best and really nice for just getting some of the fundamental knowledge and such", "upvote_ratio": 490.0, "sub": "LearnProgramming"}1040{"thread_id": "uog8c7", "question": "Right how I\u2019ve been stuck on one specific sector of beginners JavaScript on the Odin project, I\u2019m considering supplementing it with FCC, but I see so many negative reviews that\u2019s I\u2019m hesitant to give it a shot. What\u2019s your honest opinion of FCC?", "comment": "FCC is awesome and formed the foundation of my js knowledge", "upvote_ratio": 470.0, "sub": "LearnProgramming"}1041{"thread_id": "uogcon", "question": "Screen auto rotate feature is gone and replaced by a square button that appears in the bottom corner (if the phone senses me turning it) that rotates screen when tapped. Settings to enable/disable screen rotate are completely gone. Anyone know how to fix this or if it's just a poopy update? Thanks", "comment": "\n\nSwipe down your notification panel and then swipe down again to reveal all quick settings buttons.  Auto rotate should be one of those.  You should be able to just tap it fully on.\n\nOr you can long-press that button and enable \"manual rotate\" which is where a rotate button appears and you have to click it manually.  That sounds like what you have it set on.\n\nEdit: weirdly, I don't think that same setting appears anywhere in the main phone settings interface, I think it's a \"quick\" setting that has no \"non-quick\" alternative.", "upvote_ratio": 30.0, "sub": "AndroidQuestions"}1042{"thread_id": "uoghdh", "question": "The US will also be hosting the 2033 Women's Rugby World Cup.", "comment": "Rugby is a very minor sport here. The Olympics are the premier event.", "upvote_ratio": 900.0, "sub": "AskAnAmerican"}1043{"thread_id": "uoghdh", "question": "The US will also be hosting the 2033 Women's Rugby World Cup.", "comment": "2028 Olympics bc I'm a Californian and the 1984 Olympics ran a very slight profit.\n\nI hope we can do that again.", "upvote_ratio": 600.0, "sub": "AskAnAmerican"}1044{"thread_id": "uoghdh", "question": "The US will also be hosting the 2033 Women's Rugby World Cup.", "comment": "I'm not looking forward to any of them at all.", "upvote_ratio": 540.0, "sub": "AskAnAmerican"}1045{"thread_id": "uogmnd", "question": "Hello,\n\nI'm working on a 3D game math library in C++ and I was wondering.... So, I know that you should always prefer multiplication over division because it's a faster operation and I was writing a function to normalize a vector which requires that I divide each component of a 3D vector by the vector's magnitude\n\nWould it be faster in theory to create a float variable and set it equal to 1f / magnitude and then multiply each value by that float which would save on 2 divisions or would the compiler just be able to look ahead and say that it knows it's going to perform 3 divisions with the same value and optimize it anyway? I would imagine the latter depends on the compiler.\n\nI know this is a really simple operation and running it once won't matter in the grand scheme of things but what if the operation were run hundreds of thousands of times, like if for whatever reason, every triangle in a game world needed to get their surface normals normalized.", "comment": "Measure. Measure, measure, measure!\n\nhttps://quick-bench.com/", "upvote_ratio": 200.0, "sub": "cpp_questions"}1046{"thread_id": "uogmnd", "question": "Hello,\n\nI'm working on a 3D game math library in C++ and I was wondering.... So, I know that you should always prefer multiplication over division because it's a faster operation and I was writing a function to normalize a vector which requires that I divide each component of a 3D vector by the vector's magnitude\n\nWould it be faster in theory to create a float variable and set it equal to 1f / magnitude and then multiply each value by that float which would save on 2 divisions or would the compiler just be able to look ahead and say that it knows it's going to perform 3 divisions with the same value and optimize it anyway? I would imagine the latter depends on the compiler.\n\nI know this is a really simple operation and running it once won't matter in the grand scheme of things but what if the operation were run hundreds of thousands of times, like if for whatever reason, every triangle in a game world needed to get their surface normals normalized.", "comment": "If you compile with `-ffast-math` (`/FP:fast` on MSVC) then the compiler can ignore strict IEEE fp math compliance and will compile multiple identical divisions to one variable with the reciprocal and then multiple multiplications of this reciprocal.", "upvote_ratio": 100.0, "sub": "cpp_questions"}1047{"thread_id": "uogmnd", "question": "Hello,\n\nI'm working on a 3D game math library in C++ and I was wondering.... So, I know that you should always prefer multiplication over division because it's a faster operation and I was writing a function to normalize a vector which requires that I divide each component of a 3D vector by the vector's magnitude\n\nWould it be faster in theory to create a float variable and set it equal to 1f / magnitude and then multiply each value by that float which would save on 2 divisions or would the compiler just be able to look ahead and say that it knows it's going to perform 3 divisions with the same value and optimize it anyway? I would imagine the latter depends on the compiler.\n\nI know this is a really simple operation and running it once won't matter in the grand scheme of things but what if the operation were run hundreds of thousands of times, like if for whatever reason, every triangle in a game world needed to get their surface normals normalized.", "comment": "You could investigate this using [Compiler Explorer](https://godbolt.org/). It would allow you to check a variety of compilers, as well as optimization levels and see what assembly is generated.", "upvote_ratio": 100.0, "sub": "cpp_questions"}1048{"thread_id": "uogpq8", "question": "So I am green to IT. I am currently going for a BS in IT and expect to have my degree in a year or so. This is my first IT job, and I have 6 months into it so far, with a few years of retail customer support type of roles before this. Currently, my job is first level Help Desk internally with some elements of tech support, and I wanted to apply to become a technician and do more desktop support. I even picked up my A+ and I'm working on my Net+ to get more credibility. The only issue is my boss still looks at me for how I was on my first 1-2 weeks here. He doesn't trust me to even do this new job and seems to think my skillset is the same as when I first started here. Even though he knows I picked up some certs and I've been trying to upskill during downtime or on my weekends at my home lab. I still have that reputation of being a total noob 6 months later when I've advanced and upskilled a little bit at the very least. I've tried taking on additional responsibilities in my current role and even worked in other departments in IT to learn more about our shop and absorb the policies and standards, but my boss just won't throw me a bone.\n\nI'm being brick-walled and I don't intend on staying here 5+ years just to MAYBE get a chance at growth. Is this normal for IT? For your employer to not realize your growth in your job and not give you opportunities. I really hope I don't need to job hop every year just to get a raise or promotion.", "comment": "6 months is not a lot of time. Some companies will work through onboarding during that amount of time. I wouldn\u2019t trust someone who was just hired 6 months ago to be working with critical systems. Certificates are great but they don\u2019t really mean much in a real work environment, they\u2019re more like checkboxes of nice to haves more so than actual proof that you know what you\u2019re doing. \n\n\nTrust me when I say that you\u2019ll have plenty of time to learn and be so deep underwater from work that you can barely come up for air. Take this time and learn. If you think the pace of your company is too slow, move on and find one that will move faster. \n\nI don\u2019t think you\u2019re being brick-walled. Again, you\u2019ve been there for 6 months, it takes a year or so to actually learn the environment and infrastructure at some companies. \n\nAgain, if you\u2019re unhappy with your job just move on. You owe no loyalty to your company and maybe you\u2019ll find a better fit somewhere else but I can bet that most people here will tell you, 6 months isn\u2019t as long as you think it is and honestly unless the company you work for has 3 servers and 10 clients; you\u2019ve not even scratched the surface of actually knowing anything. I\u2019m sure the opportunity to do more will come with time. Again, if you want to be thrown into the frying pan on as soon as possible maybe you need to look elsewhere.\n\nAnd just to add my own experiences here. When I started at my last job, all I did was reset passwords and add/remove users from security groups for the first six months. A year later I was in charge of project proposals, deployments, and support. I got pretty overwhelmed pretty quickly. Deploying new functionalities in a company with over 1000+ servers and 4000+ users and managing/resolving tickets for those new functionalities was way more than I would\u2019ve liked to do.", "upvote_ratio": 50.0, "sub": "ITCareerQuestions"}1049{"thread_id": "uoguaj", "question": "Sure, there's a bunch of formal manager docs on this. \n\nBut speaking from an intern's perspective, what would you like to see?", "comment": "Just friendliness and being open to helping out.", "upvote_ratio": 4700.0, "sub": "CSCareerQuestions"}1050{"thread_id": "uoguaj", "question": "Sure, there's a bunch of formal manager docs on this. \n\nBut speaking from an intern's perspective, what would you like to see?", "comment": "I\u2019m interning this summer and I\u2019d really hope there is a single person who I have the freedom to ask questions about everything. The technical stuff and general office questions", "upvote_ratio": 2230.0, "sub": "CSCareerQuestions"}1051{"thread_id": "uoguaj", "question": "Sure, there's a bunch of formal manager docs on this. \n\nBut speaking from an intern's perspective, what would you like to see?", "comment": "Bro down with them. Kegs, strihp clubbs, 30 raks, best of 69 1v1 flip cup.", "upvote_ratio": 600.0, "sub": "CSCareerQuestions"}1052{"thread_id": "uohf96", "question": "Ok, hear me out - I know we're experts in multi-tasking North, South, East, and West but I personally feel like we share way more similarities with Mexico, Brazil, Colombia, Argentina, etc. than the UK and Germany.\n\nI could go so deep into this, but they both have huge populations like us. Mexico City and Sao Paulo/Rio remind me a lot of our NYC/LA mega cities. etc.", "comment": "No, we share most with Canada, Australia, NZ more than Europe. Latin America has a different culture altogether, not to say we don't have similarities in other aspects. I'm of Mexican heritage, so that's my pov.", "upvote_ratio": 1030.0, "sub": "AskAnAmerican"}1053{"thread_id": "uohf96", "question": "Ok, hear me out - I know we're experts in multi-tasking North, South, East, and West but I personally feel like we share way more similarities with Mexico, Brazil, Colombia, Argentina, etc. than the UK and Germany.\n\nI could go so deep into this, but they both have huge populations like us. Mexico City and Sao Paulo/Rio remind me a lot of our NYC/LA mega cities. etc.", "comment": "I\u2019m gonna need to hear a case better than \u201cwe both have big cities\u201d to really consider this.", "upvote_ratio": 990.0, "sub": "AskAnAmerican"}1054{"thread_id": "uohf96", "question": "Ok, hear me out - I know we're experts in multi-tasking North, South, East, and West but I personally feel like we share way more similarities with Mexico, Brazil, Colombia, Argentina, etc. than the UK and Germany.\n\nI could go so deep into this, but they both have huge populations like us. Mexico City and Sao Paulo/Rio remind me a lot of our NYC/LA mega cities. etc.", "comment": "No, I\u2019ve lived in Mexico for most of my life, travelled to other countries in Latin America and been to Europe many times. The US is much closer to Western Europe in everything than to Latin America.", "upvote_ratio": 700.0, "sub": "AskAnAmerican"}1055{"thread_id": "uohhi4", "question": "`for(inti=0;i<n; i++)`\n\n`{`\n\n`for(;i<n; i++)`\n\n   `{`\n\n`cout << i<< endl;`\n\n  `}`\n\n`}`", "comment": "Delete the inner for loop and you have identical code", "upvote_ratio": 80.0, "sub": "cpp_questions"}1056{"thread_id": "uohhi4", "question": "`for(inti=0;i<n; i++)`\n\n`{`\n\n`for(;i<n; i++)`\n\n   `{`\n\n`cout << i<< endl;`\n\n  `}`\n\n`}`", "comment": "https://www.learncpp.com/cpp-tutorial/for-statements/", "upvote_ratio": 30.0, "sub": "cpp_questions"}1057{"thread_id": "uohr1t", "question": " It is so strange, because whenever they say that Biden is the 46th  president, he really isn't. He is the 45th person to serve that role. If  in the future, presidents serving non-consecutive terms becomes common,  we could have the 100th president be the 90th person to serve the role  or something. I personally think it is quite crazy, and Biden should be  POTUS #45.\n\nEdit: I deleted the first post because I wanted to change the sub-text but could not do that.", "comment": "I\u2019m devastated", "upvote_ratio": 380.0, "sub": "AskAnAmerican"}1058{"thread_id": "uohr1t", "question": " It is so strange, because whenever they say that Biden is the 46th  president, he really isn't. He is the 45th person to serve that role. If  in the future, presidents serving non-consecutive terms becomes common,  we could have the 100th president be the 90th person to serve the role  or something. I personally think it is quite crazy, and Biden should be  POTUS #45.\n\nEdit: I deleted the first post because I wanted to change the sub-text but could not do that.", "comment": "The president is an office, or a role, like in a play. The people vote on who gets to be cast in the role. Super Grover played that role on the 22nd and 24th go around. \n\nBut that\u2019s the super technical explanation no one really cares about because office=person is a useful shortcut. It is a none issue unless you are the rare position of having to really care about the details.", "upvote_ratio": 280.0, "sub": "AskAnAmerican"}1059{"thread_id": "uohr1t", "question": " It is so strange, because whenever they say that Biden is the 46th  president, he really isn't. He is the 45th person to serve that role. If  in the future, presidents serving non-consecutive terms becomes common,  we could have the 100th president be the 90th person to serve the role  or something. I personally think it is quite crazy, and Biden should be  POTUS #45.\n\nEdit: I deleted the first post because I wanted to change the sub-text but could not do that.", "comment": "Grover Cleveland spanked me on two non-consecutive occasions", "upvote_ratio": 240.0, "sub": "AskAnAmerican"}1060{"thread_id": "uoi0vk", "question": "Am I the only one with this mentality?  \n\n**note-this post will be void of many specifics to avoid the off chance of being identified**\n\nI\u2019ve been in a couple related IT fields for well over a decade.\n\nI\u2019m an EXTREMELY fast learner and get very good at any job I\u2019m assigned.  Many of my document templates have became SOPs.  I\u2019m known as the subject matter expert on a few different things and once I became a boss of a small IT team sort of by accident.\n\nThat\u2019s not a brag, it is just to preface the fact that I\u2019m probably not a loser by most definitions.\n\nBut the point of this post is to ask if I\u2019m the only one who does well in this field but just does not give a damn about it?\n\nAt my current job I am the only person in my particular area of IT.  I installed a lot of the infrastructure, I\u2019m the only one who maintains it and have all the notes.  To top it off, I\u2019m also a single point of failure for that area.  So if I go there\u2019s gonna be heartache.\n\nI do answer to a larger team in a different location but can go literal months without having to speak to them.  \n\nPlease don\u2019t get me wrong, I do not hate my job.  The people and the workload (and the pay) are amazing.  But some times my leads and supervisors talk to me like the job is my life.  They ask me industry related questions.  And I believe they think I\u2019m more than one person from the many hats I wear.  But deep down, I do not care about any of it.  When someone tries to get me to do something by dropping a VIP name it makes me sick.  There\u2019s zero organizational pride in me.  And I have a huge amount of imposter syndrome even though literally everyone praises my abilities on a daily basis.\n\nMy literal only motivation is not being fired.  I\u2019ve always sorta been like that.  Even in school I was a good student and never got in trouble only because I didn\u2019t want others mad at me.  But if you asked me about any subject (except history and some science) I\u2019d tell you I do not care and they bore me.\n\nAnd the same goes with IT work.  It comes a little bit natural to me so I don\u2019t struggle all that often.  But if I never logged onto a box or CLI again I wouldn\u2019t miss one second of it.\n\nI hope Ive described this well enough to maybe see if anyone relates.  It just seems to be getting worse as I get older.  The good news is the telework hybrid schedule sorta numbs the boredom and burnout but even that\u2019s coming to an end soon.", "comment": "So funny to hear this after seeing so many people working so hard to get into IT just to make more money. I just got into so I hope I enjoy like I think I will.", "upvote_ratio": 80.0, "sub": "ITCareerQuestions"}1061{"thread_id": "uoi0vk", "question": "Am I the only one with this mentality?  \n\n**note-this post will be void of many specifics to avoid the off chance of being identified**\n\nI\u2019ve been in a couple related IT fields for well over a decade.\n\nI\u2019m an EXTREMELY fast learner and get very good at any job I\u2019m assigned.  Many of my document templates have became SOPs.  I\u2019m known as the subject matter expert on a few different things and once I became a boss of a small IT team sort of by accident.\n\nThat\u2019s not a brag, it is just to preface the fact that I\u2019m probably not a loser by most definitions.\n\nBut the point of this post is to ask if I\u2019m the only one who does well in this field but just does not give a damn about it?\n\nAt my current job I am the only person in my particular area of IT.  I installed a lot of the infrastructure, I\u2019m the only one who maintains it and have all the notes.  To top it off, I\u2019m also a single point of failure for that area.  So if I go there\u2019s gonna be heartache.\n\nI do answer to a larger team in a different location but can go literal months without having to speak to them.  \n\nPlease don\u2019t get me wrong, I do not hate my job.  The people and the workload (and the pay) are amazing.  But some times my leads and supervisors talk to me like the job is my life.  They ask me industry related questions.  And I believe they think I\u2019m more than one person from the many hats I wear.  But deep down, I do not care about any of it.  When someone tries to get me to do something by dropping a VIP name it makes me sick.  There\u2019s zero organizational pride in me.  And I have a huge amount of imposter syndrome even though literally everyone praises my abilities on a daily basis.\n\nMy literal only motivation is not being fired.  I\u2019ve always sorta been like that.  Even in school I was a good student and never got in trouble only because I didn\u2019t want others mad at me.  But if you asked me about any subject (except history and some science) I\u2019d tell you I do not care and they bore me.\n\nAnd the same goes with IT work.  It comes a little bit natural to me so I don\u2019t struggle all that often.  But if I never logged onto a box or CLI again I wouldn\u2019t miss one second of it.\n\nI hope Ive described this well enough to maybe see if anyone relates.  It just seems to be getting worse as I get older.  The good news is the telework hybrid schedule sorta numbs the boredom and burnout but even that\u2019s coming to an end soon.", "comment": "So, I generally have a complete lack of care to whatever my company's goals are.\n\nThat having been said, my enjoyment of IT stems purely out of the concept of \"I want to leave things better than how it was handed to me\".  I generally enjoy improving the efficiency of an existing system.  That could involve engineering new solutions, making existing things work better, automation, etc.  This behavior also shows up in hobbies (keeping knives sharp, cleaning off rust) and entertainment (clocked in almost 200 hours in Dyson Sphere Program).\n\nI think I do tend to enjoy coding the most since I generally find that whenever I'm coding the entire day flies right by.\n\n​\n\n>My literal only motivation is not being fired.\n\nI personally don't think you need to like or love your job, or even care.  Though I think \"only not wanting to be fired\" tends to be a peg below that.  One healthier mentality I've read is \"my job pays me but I don't enjoy it.  I have hobbies I like and my job pays for my hobbies that I do enjoy, hence I keep working.\"", "upvote_ratio": 40.0, "sub": "ITCareerQuestions"}1062{"thread_id": "uoi0vk", "question": "Am I the only one with this mentality?  \n\n**note-this post will be void of many specifics to avoid the off chance of being identified**\n\nI\u2019ve been in a couple related IT fields for well over a decade.\n\nI\u2019m an EXTREMELY fast learner and get very good at any job I\u2019m assigned.  Many of my document templates have became SOPs.  I\u2019m known as the subject matter expert on a few different things and once I became a boss of a small IT team sort of by accident.\n\nThat\u2019s not a brag, it is just to preface the fact that I\u2019m probably not a loser by most definitions.\n\nBut the point of this post is to ask if I\u2019m the only one who does well in this field but just does not give a damn about it?\n\nAt my current job I am the only person in my particular area of IT.  I installed a lot of the infrastructure, I\u2019m the only one who maintains it and have all the notes.  To top it off, I\u2019m also a single point of failure for that area.  So if I go there\u2019s gonna be heartache.\n\nI do answer to a larger team in a different location but can go literal months without having to speak to them.  \n\nPlease don\u2019t get me wrong, I do not hate my job.  The people and the workload (and the pay) are amazing.  But some times my leads and supervisors talk to me like the job is my life.  They ask me industry related questions.  And I believe they think I\u2019m more than one person from the many hats I wear.  But deep down, I do not care about any of it.  When someone tries to get me to do something by dropping a VIP name it makes me sick.  There\u2019s zero organizational pride in me.  And I have a huge amount of imposter syndrome even though literally everyone praises my abilities on a daily basis.\n\nMy literal only motivation is not being fired.  I\u2019ve always sorta been like that.  Even in school I was a good student and never got in trouble only because I didn\u2019t want others mad at me.  But if you asked me about any subject (except history and some science) I\u2019d tell you I do not care and they bore me.\n\nAnd the same goes with IT work.  It comes a little bit natural to me so I don\u2019t struggle all that often.  But if I never logged onto a box or CLI again I wouldn\u2019t miss one second of it.\n\nI hope Ive described this well enough to maybe see if anyone relates.  It just seems to be getting worse as I get older.  The good news is the telework hybrid schedule sorta numbs the boredom and burnout but even that\u2019s coming to an end soon.", "comment": "I hear ya. I'm not even in the field yet but its how i feel. I dont like or care about IT but i know the information i need to to do the job and i want to eventually have a job that i can WFH and i'm not an artist or a writer so this is what i'm planning on doing with the rest of my time til i retire.", "upvote_ratio": 40.0, "sub": "ITCareerQuestions"}1063{"thread_id": "uoi4tt", "question": "Are newer languages like Rust and Go becoming better options for building applications where languages like C and C++ would've typically been used?", "comment": "go can't be used for the same apps because it's garbage collected. rust is becoming an option. whether it's better or not is a matter of opinion. it's not definitively better.", "upvote_ratio": 60.0, "sub": "AskProgramming"}1064{"thread_id": "uoi4tt", "question": "Are newer languages like Rust and Go becoming better options for building applications where languages like C and C++ would've typically been used?", "comment": "Go is in no way an alternative to C, C++ or Rust. It competes in the same space as Java and C#.", "upvote_ratio": 40.0, "sub": "AskProgramming"}1065{"thread_id": "uoikgm", "question": "My first ever job was at a McDonalds in NJ back in 2012 where I made $7.25. My wage increased to $8.25 the next year as the wage in NJ went up. Now almost 10 years later, I\u2019ve noticed that while many places still have a $7.25 minimum wage, a lot of places that normally pay minimum are now paying more than that even if their state minimum is $7.25.  Last year I was on a road trip and stopped at a McDonalds in Kentucky. Even though their state minimum was $7.25, they were advertising outside the building that their restaurant starts off at around $12-$14 if I remember correctly.", "comment": "Not really. Even McDonald's is paying 14 an hour here in Idaho because absolutely nobody is willing to work for less than that, and there is such a labor shortage that people can be more picky about where they work.", "upvote_ratio": 600.0, "sub": "AskAnAmerican"}1066{"thread_id": "uoikgm", "question": "My first ever job was at a McDonalds in NJ back in 2012 where I made $7.25. My wage increased to $8.25 the next year as the wage in NJ went up. Now almost 10 years later, I\u2019ve noticed that while many places still have a $7.25 minimum wage, a lot of places that normally pay minimum are now paying more than that even if their state minimum is $7.25.  Last year I was on a road trip and stopped at a McDonalds in Kentucky. Even though their state minimum was $7.25, they were advertising outside the building that their restaurant starts off at around $12-$14 if I remember correctly.", "comment": "Not recently that I've seen, but a couple years ago there were. \n\nI also keep seeing things like \"*for select positions and shifts\" at the bottom of those $12-14 signs around here, which makes me wonder about the base rate.", "upvote_ratio": 270.0, "sub": "AskAnAmerican"}1067{"thread_id": "uoikgm", "question": "My first ever job was at a McDonalds in NJ back in 2012 where I made $7.25. My wage increased to $8.25 the next year as the wage in NJ went up. Now almost 10 years later, I\u2019ve noticed that while many places still have a $7.25 minimum wage, a lot of places that normally pay minimum are now paying more than that even if their state minimum is $7.25.  Last year I was on a road trip and stopped at a McDonalds in Kentucky. Even though their state minimum was $7.25, they were advertising outside the building that their restaurant starts off at around $12-$14 if I remember correctly.", "comment": "Yes. Loads of minimum wage jobs in small towns out here working at gas stations and local businesses.", "upvote_ratio": 250.0, "sub": "AskAnAmerican"}1068{"thread_id": "uoj2nu", "question": "What is something you changed your stance on after learning more about it?", "comment": "That case where McDonald's had to pay a bunch of money to a woman who spilled hot coffee on herself.", "upvote_ratio": 325340.0, "sub": "AskReddit"}1069{"thread_id": "uoj2nu", "question": "What is something you changed your stance on after learning more about it?", "comment": "Understanding why people shake their baby. \n\nOf course it is absolutely horrible and it seems like it should make sense that nobody should even think about doing it but I have an understanding of how it can happen now.\n\n I had my own daughter 4 years ago and swore up and down that nobody but a monster would shake their child but let me tell you that sleep deprivation is hell and it is terrifying. \n\nWhen my daughter was a newborn, she was crying very hard one particular night and nothing we did seemed to soothe her crying. My insanely sleep deprived brain started trying to take over and I could feel the urge to shake her. \n\nLuckily, I had just enough cognitive function to recognize that I was in a very vulnerable and bad situation. I set my daughter back down in her crib and walked away for a little while so as to wake myself up some more. \n\nThat is the most scared I've ever been of what the human brain is capable of.", "upvote_ratio": 260220.0, "sub": "AskReddit"}1070{"thread_id": "uoj2nu", "question": "What is something you changed your stance on after learning more about it?", "comment": "Bad posture .", "upvote_ratio": 221450.0, "sub": "AskReddit"}1071{"thread_id": "uoj8g9", "question": "It goes without saying that things around the world aren't particularly good right now. I'm really stressed out about climate change and people's rights getting rolled back. How did you manage similar stressors of your time? How did you not give into hopelessness and maintain faith in others?", "comment": "Gen X here. Zero fucks given after a period of time to save my own sanity. Not that I don\u2019t care about humanity don\u2019t get me wrong. But let me rephrase that. Just do you and try to focus on your little piece of the world and try to do good in your own life. Advocate for change. Do it in silence if you need to. But don\u2019t sacrifice yourself or your own mental health in trying to make it happen. Eventually history repeats itself so this period will be over as well. At the end of the day you can truly say you were not part of the problem but part of the solution. I refuse to believe all of my female ancestors sacrificed themselves for the end result to be this bullshit.\n As far as climate change, I think we are fucked for a while. Mother Nature already sought revenge with COVID and wildfires etc. Focus on yourself and what type of energy you are putting into the universe. It will match you eventually. At least, I hope.", "upvote_ratio": 580.0, "sub": "AskOldPeople"}1072{"thread_id": "uoj8g9", "question": "It goes without saying that things around the world aren't particularly good right now. I'm really stressed out about climate change and people's rights getting rolled back. How did you manage similar stressors of your time? How did you not give into hopelessness and maintain faith in others?", "comment": "Near-overwhelming stuff isn't too tough because you can just \"deal\"--the wars, shortages, inflation, recession, and all that basic stuff is just speedbumps.\n\nWhat's hard to deal with is the periods of remarkable stupidity.  These are the times when what you thought were reasonably sane people, suddenly go insane and believe obvious BS like it's a religion--and usually get into attack mode against anyone who doesn't fall for the same delusions they have.\n\nI can think of 3 of those periods:  \n\n* The 'Regan revolution\" where a ton of obvious economic and environmental idiocy suddenly became normalized and even revered.  Sane people fell for the BS.\n\n* Post 911 when Bush and Co. were shoveling manure at the public to justify a war.  About half the country saw through it and protested heavily to try and stop the nonsense but were not successful for reasons too complex to post here.\n\n*  And the grandaddy of them all--the incredible insane idiocy of the far right-wing kooks today.  They'll believe things that are provably nonsense and fight you to the mattresses just to maintain that delusion.  Black is white, up is down, right is wrong.\n\nDuring those whack-job times, first, remember that nothing lasts forever and history demonstrates that the wackiness ebbs and flows over time: It will reduce and effectively end....eventually.  So you turn your life into tunnel-vision mode and focus on the things that directly affect your daily life--Ignore that which is not under you actual control or doesn't effect you now, today.  It sucks but as the song from Jackson Browne illustrates, sometimes you need to give your brain a break:  \n\nDoctor, my eyes...\n\n---Tell me what is wrong\n\n-----Was I unwise...\n\n--------to leave them open for so long?", "upvote_ratio": 550.0, "sub": "AskOldPeople"}1073{"thread_id": "uoj8g9", "question": "It goes without saying that things around the world aren't particularly good right now. I'm really stressed out about climate change and people's rights getting rolled back. How did you manage similar stressors of your time? How did you not give into hopelessness and maintain faith in others?", "comment": "It's important to take breaks from things over which you have no control.\n\nIt's important to take all that emotional fuel and use it for productive solutions.\n\nFor every horrible person who makes the news, there are millions doing good instead.\n\nThere's a time to do what you can for a cause in the right timing.  There's a time to trust those with the passion and actionable opportunities to hold the line.\n\nIt's rough having to relive things we settled long ago.  As a woman, really rough.\n\nIt's rough living in a future over which we had little control.  \n\nI was young.  They said we had 20 years to fix the climate.  Their math was wrong.  It hurt the cause.  But greater forces had interests to protect.  Even with accurate math, it was an uphill battle.  It is completely absurd where we are today.  And my generation hasn't even really had a chance to run things yet.\n\nI look at it this way.  Soak in the beauty while it's still here.  \n\nSavor the people who made it to the other side of the pandemic with you.\n\nIf it's on your heart and in your skillset, find those making the change and make it alongside them.  You cannot solve any of the worlds problems on your own.  It takes a global village.\n\nResearch the innovations.  Get involved when you are able.\n\nDo all he boring things like writing local and national representatives and voting. If you're in a state doing dumb stuff, find the others and get initiates passed.  All the boring stuff that takes persistence over time.\n\nWatch cartoons.  Get lost in a good book.  Meditate.  Feet in the grass.  Hot baths. Sports, lifting heavy objects.  Make sure you allow moments of joy and movement into your day.  Hugs if you're a hug person.  Go outside right now and gaze the stars or clouds or a tree or flower.", "upvote_ratio": 200.0, "sub": "AskOldPeople"}1074{"thread_id": "uojb2u", "question": "The last state to join was Hawaii, some 32 years (I can't count today) before I was born.\n\nPuerto Rico comes to mind, after that, maybe Guam?", "comment": "Most likely it will be Puerto Rico.", "upvote_ratio": 1280.0, "sub": "AskAnAmerican"}1075{"thread_id": "uojb2u", "question": "The last state to join was Hawaii, some 32 years (I can't count today) before I was born.\n\nPuerto Rico comes to mind, after that, maybe Guam?", "comment": "Guam won\u2019t become a state in the near future unfortunately, or any of the other smallest territories such as American Samoa or the Virgin Islands. \n\nThe two only feasible options are Puerto Rico and DC. Personally, I think DC will get it first. It has a stronger economy. But, Puerto Rico probably wouldn\u2019t be far behind.\n\nUltimately, just purely speaking matter of fact, a republican congress would never approve either, as both are very liberal. Democrats would also need a significant majority in both houses to push it through, and even then I\u2019m not sure they would.\n\nUnfortunately, it\u2019s become a very politically motivated issue, like most other things, rather than the will of the people actually living there.", "upvote_ratio": 380.0, "sub": "AskAnAmerican"}1076{"thread_id": "uojb2u", "question": "The last state to join was Hawaii, some 32 years (I can't count today) before I was born.\n\nPuerto Rico comes to mind, after that, maybe Guam?", "comment": "I think Puerto Rico will.  Guam might, but they'd probably have to reunite with the Northern Mariana Islands first.", "upvote_ratio": 360.0, "sub": "AskAnAmerican"}1077{"thread_id": "uojpox", "question": "Whenever you want to be immune to a virus, you get a vaccine or you become infected and your immune system fights it off and you become immune. The body can also build up an immunity to venom, but it takes several attempts in order to become capable of taking what would be a lethal dose. Why can\u2019t the body produce antibodies to venom on demand like they do for a virus?", "comment": "There are obviously fundamental differences between viruses and toxins. A typical virus takes a bit of time and does some damage before the adaptive immune system can get geared up to handle the infection. Whereas venom is just everything all at once and quickly overwhelms our innate defenses.\n\nLike you've mentioned, it can take quite a few treatments before someone is able to handle something like venom because you basically have to trick your immune system to be constantly vigilant to the point of total dose neutralization. That means having enough freely circulating antibodies to bind the venom/toxin molecules.\n\nSo for something like snake venom you need both an extended ramp up for protection but also continuation of treatment because the immunity will quickly wane.\n\nAn interesting note would be something like a botulism vaccination. We protect our sileage-eating livestock from botulism toxin via a vaccination but we don't give this vaccine to humans because botulism is exceedingly rare and Botox has an incredibly valuable medical usage. We do however have botulism antitoxin made from horse serum for adults and a pool of vaccinated humans providing serum for infants.\n\nSimilarly, anthrax vaccination is specifically against a component of the anthrax toxin.", "upvote_ratio": 570.0, "sub": "AskScience"}1078{"thread_id": "uojpox", "question": "Whenever you want to be immune to a virus, you get a vaccine or you become infected and your immune system fights it off and you become immune. The body can also build up an immunity to venom, but it takes several attempts in order to become capable of taking what would be a lethal dose. Why can\u2019t the body produce antibodies to venom on demand like they do for a virus?", "comment": "[removed]", "upvote_ratio": 130.0, "sub": "AskScience"}1079{"thread_id": "uojpox", "question": "Whenever you want to be immune to a virus, you get a vaccine or you become infected and your immune system fights it off and you become immune. The body can also build up an immunity to venom, but it takes several attempts in order to become capable of taking what would be a lethal dose. Why can\u2019t the body produce antibodies to venom on demand like they do for a virus?", "comment": "3rd year undergraduate in Human Biology- definitely take what I\u2019m saying with a grain of salt. Or 3. \n\nI think what it comes down to is the difference in mechanisms between venom and viruses. Venom may act as a neurotoxin, preventing the neurons from communicating to/with other neurons and muscular tissue (-> respiratory distress -> death).  This aids the animal (snake, spider, whatever) in a fight-or-flight scenario, where the venomous animal would use venom to kill or paralyze the predating animal. \n\nViruses, although we shouldn\u2019t \u201canthropomorphize\u201d their intentions for causing infection, use their mechanism of infection to hijack cellular machinery and replicate more of themselves. For survival. Darwin or whatever. However, since viruses like the common flu or COVID, or even HIV are not using an instantly cytotoxic/neurotoxic mechanism, the immune system has an opportunity to recognize it and develop an antibody. \n\nCut simply, viruses in your body are like ants within your home, and they will grow in numbers until they eat all your food, and you die. But you could buy ant traps, or maybe even a flamethrower and then you have a chance of fighting them first time. Venom is like a Noah\u2019s ark flood to your house, just uprooting it from the ground and you don\u2019t have enough buckets in time. Maybe if you prepared channels in your house for the second time a flood comes, you could have a slightly better chance of survival. \n\nAgain, take it with a handful of salt. Maybe even the whole shaker", "upvote_ratio": 80.0, "sub": "AskScience"}1080{"thread_id": "uojxeq", "question": "[Text of Newton's speech](https://www.blackpast.org/african-american-history/speeches-african-american-history/huey-p-newton-women-s-liberation-and-gay-liberation-movements/)", "comment": "In 1969, Jean Genet, a French writer, came to the United States to interview Huey Newton and other Panther leaders. Genet, who was gay, was significantly wounded by the homophobic terms that were frequently bandied about by the Panthers. After returning to France, Genet sent Newton a message articulating his distress about the group's use of derogatory and repressive language, equating the use of the f-word to the equally reprehensible n-word.\n\nGenet's message profoundly altered Newton's perceptions of homosexuality and masculinity. In 1970, Newton and the Black Panthers began making overtures to form an alliance with the Gay Liberation movement. The Party's newfound philosophy was grounded in the rationalization that revolutionary people \"must gain security in ourselves and therefore have respect and feelings for oppressed people.\" Newton would go on to write that \"we have not said much about homosexuals at all, but we must relate to the homosexual movement because it is a real thing...\\[Homosexuals\\] might be the most oppressed people in society.\" As a means of showing respect to homosexuals, inspired by Genet's comments, and of showing commitment to the cause, Newton concluded that \"the terms 'faggot' and 'punk' should be deleted from our vocabulary, and especially we should not attach names normally designed for homosexuals to men who are enemies of the people such as Nixon or Mitchell. Homosexuals are not enemies of the people.\" In his book, *Black Power*, Jeffrey Ogbar recounts the tale of an openly gay member of the Black Panthers who operated in the Jamaica Queens branch of New York. He was accepted in the Party because \"he was truly committed; people knew that.\" Though committed, some members still used unapproved, offensive language. When confronted by a newer member for his homosexuality \"a fistfight broke out between the two. The offending Panther was soundly beaten, and it was the last time that homophobic remarks were made at the office.\" The defeat of a heterosexual male by a homosexual male effectively ended that thought that homosexuals were unmanly.\n\nThe Panthers were the first of any non-gay black organization to support the homosexual cause. The Panthers \"connected 9the oppression of homosexuals\\] to the plight of black people; and attempted--based on that connection--to build coalitions openly with lesbians and gay men.\" David Hilliard would go on to say that \"\\[the Panthers\\] were a human rights movement. It had nothing to do with race, as we were trying to move mankind to a higher manifestation, to make this world a better place.\" As he said he would earlier, Newton had any terms that could be considered derogatory to homosexuals removed from the Panthers' vocabulary, as allies in the struggle all interactions had to remain respectful.\n\nThe Black Panthers soon found themselves widely supported in the gay community. At a Panther really at Temple University, participants began chanting \"Gay, gay power to the gay, gay people! Power to the People! Black, black power to the black, black people! Gay, gay power to the gay, gay people! Power to the People!\" Much like other oppressed people, LGBTQ organizations bean emulating the Panthers; the \"newly formed Gay Liberation Front and many feminist groups...all regarded the BPPP as their inspiration and vanguard.\"\n\nSources:\n\nJeffrey Ogbar - *Black Power*\n\nHuey Newton - *Revolutionary Suicide*\n\nHuey Newton - *To Die For the People*\n\nDavid Hilliard - *Hear Our Roar!*", "upvote_ratio": 620.0, "sub": "AskHistorians"}1081{"thread_id": "uok6u1", "question": "My priorities in life were awful when I was younger, when I was ready to get myself on track I spent 3 years caring for loved ones before they passed. I am studying for my A+ now I am focused now and very eager to learn and drive myself forward. But I can't help but be worried that once A+ is done with only a year of work exp that trying to find a job will be very difficult. After A+ is done I'm planning to go to school for an assc degree in IT. Ultimately, I'm worried that it's going to be extremely hard to find a job. I can't leverage any customer focused exp like many suggest. At most I can say I did it for a few months as my job now is in a warehouse, Which I've excelled. Moved into specialist roles, consistently hit my productivity goals. I'm not micro managed like other asscociates because I've learned their systems and know where to direct my attention day by day, conistently commended for my hardwork etc. I plan to leave this job in June after my bonus to go to work somewhere closer and have something that interacts with customers.  \n\n\nJust afraid my lack of work expierence and a massive time of unemployment and no school is going to push me to the discard pile immediately. Should I be this concerned? What would you think if an applicant came across your desk with only 1 year of work exp, student for IT/Cybersec, A+ maybe N+ certs? The past year I've been very focused on moving forward. But I have had alot to catch up on.  \n\n\nAny insight to what I may face will be helpful. Thank you.", "comment": "You're right in the fact that only a year of job experience at 27 will not look good on a CV - there's no other way to look at it. However I would definitely focus on the experience that you have and outline how you excelled in that job - also can explain to employers if you wish, that you had personal life issues to deal with past few years. \n\nAt the end, all it takes is for someone to give you a chance. So get that A+, brush up on your interview skills so that you can present yourself in a positive way with confidence. Don't let the lack of work experience stop you from applying to help desk roles, it's an entry level role after all and you can learn a lot from it, even if the work can be a bit tedious. It's a great starting point!", "upvote_ratio": 40.0, "sub": "ITCareerQuestions"}1082{"thread_id": "uol5u7", "question": "The Catholic church claims to know the complete list of all 266 popes who reigned from the 1st to the 21st century, starting with St Peter himself. They also give exact dates for the duration of their papacies for nearly all of them. How credible is this from the perspective of a historian?", "comment": "[removed]", "upvote_ratio": 8790.0, "sub": "AskHistorians"}1083{"thread_id": "uol5u7", "question": "The Catholic church claims to know the complete list of all 266 popes who reigned from the 1st to the 21st century, starting with St Peter himself. They also give exact dates for the duration of their papacies for nearly all of them. How credible is this from the perspective of a historian?", "comment": "I addressed this question somewhat in a previous post [here](https://old.reddit.com/r/AskHistorians/comments/gycdd0/are_there_early_bishops_of_rome_whose_pontificate/) , but here is a relevant part to your question:\n\n>Which brings us to Catholic tradition, which attempts to create an unbroken line of Bishops of Rome to give the Pope the apostolic authority that justifies his position in the church today (and the episcopal ecclesiology that the Catholic Church structures itself on). Apostolic authority is essential to the Catholic religion because it gives the Pope authority from Jesus himself, who allegedly installed Peter as the first Bishop of Rome. Contrary to (perhaps) popular belief, the New Testament (or other 1st and 2nd century texts, for that matter) does not explicitly (or, in the mind of many, implicitly) outline this installment. Most sources indicate that Peter visited Rome, but whether he led the church there is matter for much debate (in fact, if his ministry mirrored his peers and we consider the political situation in Rome at the time, he probably did not \u201csettle down\u201d to lead the church in Rome as its bishop). Still, as it is reflected in the Second Vatican Council, it is important for Catholics to see Peter as the \u201cFirst among the Apostles,\u201d as recognized by Jesus himself, so that the Pope reflects this style of leadership as the First Priest of the Church.\n\n>Immediately after Peter, our sources for apostolic succession get extremely muddy. Forgetting the 3rd-century texts such as the Liberian Catalogue and Liber Pontificalis\u20142nd century \u201clists\u201d of the Bishop of Rome are also contradictory and contain numerous anomalies! Some protestant and secular scholars have proposed that the early Church in Rome operated in some sort of \u201ccollegiate episcopacy,\u201d a theory obviously inconsistent with Catholic views on succession. Some lists claim Clement as Peter\u2019s successor, while Eusebius tells us of Clement succeeded Linus and Anencletus after Peter\u2019s death. Regardless, many of these very-early \u201cBishops of Rome\u201d (to whatever extent they were) were well-known figures in early Christianity. While Eusebius didn\u2019t offer references for much of his early list, it is safe to assume that these leaders existed and were influential in the early church in some capacity. Clement, in particular, is famous for the letter commonly attributed to him that failed to make New Testament canon at Nicaea.\n\n>The list of Bishops of Rome that we have today, in their varying forms, mostly consists of historical church leaders who were recognized and their feats recorded by (mostly) Christian historians and church leaders of diverse ethnicities. While biographical details are usually hard to come by for many of these figures, their theological, doctrinal, and canonical contributions in the so-called \u201cApostolic Age\u201d are documented. Whether or not these leaders functioned in any role recognizable as the one that Pope Francis fills is debatable, if not downright unlikely. Thus, there isn\u2019t much reason to believe that these \u201cpopes\u201d didn\u2019t exist, and, as you say, held \u201csome position of authority\u201d within the early church.", "upvote_ratio": 4010.0, "sub": "AskHistorians"}1084{"thread_id": "uol5u7", "question": "The Catholic church claims to know the complete list of all 266 popes who reigned from the 1st to the 21st century, starting with St Peter himself. They also give exact dates for the duration of their papacies for nearly all of them. How credible is this from the perspective of a historian?", "comment": "I am not a historian, just very interested in the early church period, I hope I don't mistep on the rules it seems you can answer even though you are not a historian, but as long as you provide sources. \n\nThe early papacy is murky, specifically because it was an underground organisation that was persecuted and at a certain times they were forced to hand over writings to the Roman authorities, coincidently that is where we get the word traditores or traitors, \"those who handed over\". The Latin word for traitor was Proditor.\n\nSo it gets difficult to even have a lot of writing until the religion is legalized, or there are lulls in persecution. \n\nThere are  sources for Linus as the succesor for Peter. Linus and the next 4 popes are mentioned in the bible as disciples, Linus specifically in the Second Epistle to Timothy and Paul mentions him keeping him company in Rome. \n\nThe first mention preserved is by Irenaeus at 180 AD. He was a Greek Bishop working in what would later become France, he also confirms Anacletus and Clement.\n\nHegesippus a contemporary of Irenaeus operating in Palestine  also confirmed the 3 first popes or bishops of Rome to be more accurate. It should be noted that some later lists, list Cletus instead of Anacletus, some even go more of kilter by listing them as seperate people. However the earliest sources I mentioned have a consensus that goes. Peter - Linus - (Ana) cletus\n\nThings get muddy after Clement in regards to reigns, my personal interpretation is that it coincides with the persecution by Trajan, which would have disrupted a lot of the organisation efforts by the early Christians. The names are similar in Irenaeus and Hegesippus, and their lists go up to Pope Eleutherius.\n\nThen there is an unknown author  of the \"Poem against Marcion\" that has a similar list but uses the names Anacletus and Cletus interchangeably. The Poem is form around 200 AD. \n\nAfter Pope Victor things really get muddy, and all we really know for sure are names of at least some of the Popes, because the lists we have vary depending on location and time. So much so that we even end up having an anti-pope commemorated as Popes in some Eastern Calendars like the Copts and Armenians. \n\nBy the 4th century, things are so muddy, that when the Church is legalized you have several lists going about, and Eusebius is one of the few that tries to source his info instead of just relying on what was handed down orally. He uses Iraneus and Hegesippus, unfortunatley only few fragments of Hegesippus  texts have been preserved.\n\nIt is only after the Edict of Serdica and the Edit of Milan that you start to have Christians and others seriously ponder the origins of the Church and its history. \n\nThe most Reliable efforts are from Eusebius, in his Chronica and his histories. \n\nThen there is the Catalogue of Liberius from the Chronography of 354. Which save for a few errors in assuming Anacletus and Cletus were different people, it lines up Iranaeus and Hegesippus lists. An important note on the Catalogue is that it seems to source its information from two chronicles from the 3rd century, namely Julius Sextus Africanus, and Hippolytus of Rome. \n\n[The Liberian Catalogue list](https://www.tertullian.org/fathers/chronography_of_354_13_bishops_of_rome.htm)\n\nBook \"Popes and the Tale of Their Names\" by Anura Guruge. for info on Anacletus/Cletus mixup\n\n\n[synaxarion of the Coptic church with Hippolytus as Pope](https://st-takla.org/books/en/church/synaxarium/06-amsheer/06-amshir-apolidus.html)    \n\n\n[Eusebius Church History (Book V) ](https://www.newadvent.org/fathers/250105.htm)\n\n[Iranaeus Against Heresies (Book III, Chapter 3)](https://www.newadvent.org/fathers/0103303.htm)\n\n[Chronicon remnants](http://www.attalus.org/armenian/Chronicon_of_Hippolytus.pdf)\n\n[Poem against Marcion](https://www.tertullian.org/anf/anf04/anf04-30.htm)", "upvote_ratio": 500.0, "sub": "AskHistorians"}1085{"thread_id": "uolcr0", "question": "Often times, being able to buy a house in an expensive area requires more years of saving than usual, which mean home ownership may not happen until later in life. However, if you bought a house in such an area while you were young (i.e. in your 20s or 30s), what allowed you to defy the odds?", "comment": "[deleted]", "upvote_ratio": 260.0, "sub": "AskAnAmerican"}1086{"thread_id": "uolcr0", "question": "Often times, being able to buy a house in an expensive area requires more years of saving than usual, which mean home ownership may not happen until later in life. However, if you bought a house in such an area while you were young (i.e. in your 20s or 30s), what allowed you to defy the odds?", "comment": "There were many first time home buyers programs that allowed no money down (or 3-5%) and had closing cost assistance. These were prevalent from probably 2012 up until the pandemic and allowed me to get my first house.", "upvote_ratio": 100.0, "sub": "AskAnAmerican"}1087{"thread_id": "uolcr0", "question": "Often times, being able to buy a house in an expensive area requires more years of saving than usual, which mean home ownership may not happen until later in life. However, if you bought a house in such an area while you were young (i.e. in your 20s or 30s), what allowed you to defy the odds?", "comment": "As a twenty something- pretty much none of my friends own their own home. Honestly, to speak candidly, none of us even care to. Gen Z Americans just want to move around and care more about experience imo. \n\nThat being said, in my city you can still get a 2-3 bedroom house in a neighborhood that\u2019s decent for around 200k. Often times the mortgage will be cheaper than the average rent in the area. The issue for many working to lower class Americans is saving up the money to be able to afford the down payment.\n\nEdit: first time homeowners loans are also a major benefit. Small down payment around 4%, slightly higher monthly payments. But usually still comparable to an apartment\u2019s rent.", "upvote_ratio": 90.0, "sub": "AskAnAmerican"}1088{"thread_id": "uoli0e", "question": "The length of a meter is defined by the speed of light, and not the other way around. So where/why specifically did we divide a second by 299,792,458 segments and then measure the distance light traveled in a one of those segments and called it a meter? Where did 299,792,458 come from?", "comment": "The meter was originally defined as one 40,000,000th of the circumference of the Earth along a great circle through the two poles. Later it was redefined as the length of a canonical yardstick (meterstick?) that was built as close as possible to the original intended length.\n\nIn a modern context, none of these definitions are particularly useful. The Earth isn't perfectly spherical, or even a perfect ellipsoid. Nor is it static. Defining a reference ellipsoid (WGS84 for example) requires a circular reference to another unit of length. It's inconvenient to have to physically visit a yardstick for calibration, and despite all efforts to prevent it, such an object changes length with temperature, and may also be damaged over time. None of the historical definitions would work anywhere outside of Earth.\n\nDefining the meter in terms of the speed of light is an effort to make the definition universally applicable, fixed and constant. The number 299,792,458 was chosen so that the 'new' meter would not be very much different from the old one. If you had chosen 300,000,000 then suddenly all rulers in the world, which had been calibrated relative to the yardstick, would be inaccurate at millimeter precision.", "upvote_ratio": 34540.0, "sub": "AskScience"}1089{"thread_id": "uoli0e", "question": "The length of a meter is defined by the speed of light, and not the other way around. So where/why specifically did we divide a second by 299,792,458 segments and then measure the distance light traveled in a one of those segments and called it a meter? Where did 299,792,458 come from?", "comment": "You have received some great answers. The only thing I would like to add is by the time this definition came around, the length desired was already well understood and needed to be maintained. The new definition simply gave a more stable and reproducible answer. That's why the goofy fraction. We didn't want to change the length, just define it better.", "upvote_ratio": 1600.0, "sub": "AskScience"}1090{"thread_id": "uoli0e", "question": "The length of a meter is defined by the speed of light, and not the other way around. So where/why specifically did we divide a second by 299,792,458 segments and then measure the distance light traveled in a one of those segments and called it a meter? Where did 299,792,458 come from?", "comment": "Historically, there were other definitions of the meter than the one we are using now. Using these definitions, the speed of light was measured and the theoretical results of Maxwell and Einstein that the speed of light is an universal constant, were confirmed.\n\nWhen you define a system of measurement, i.e. units which can be used to measure things, you'd like to go as fundamentally and reliable as possible. Hence, using definitions which do not depend on a particular metre bar or an iridium cylinder, the units are easier to replicate worldwide and standardize.\n\nIn the case of the metre, we have a universal constant (the speed of light) relating the units for time and length. If you define one these two, you can relate them to each other by the speed of light without any extra work. So the question is: Which of the two can be defined in a more fundamental way. It turns out that a lot of atoms oscillate very reliably and consistently, which led to the following definiton: \"The second is equal to the duration of 9192631770 periods of the radiation corresponding to the transition between the hyperfine levels of the unperturbed ground state of the 133Cs atom.\"\n\nAs all 133Cs atoms are indistinguishable, we have a global definition of the second which works as \"just look at the atoms\", which is independent of any concrete physical artefacts. This definition is also independent of things like ambient temperature or pressure, as it's referring to a property which works at the atomic level.\n\nTL;DR: Because the speed of light is constant and it's easier to standardize the second than the meter.", "upvote_ratio": 770.0, "sub": "AskScience"}1091{"thread_id": "uols8s", "question": "I don\u2019t know if there is a lot of ageism in it I don\u2019t look old I look like I\u2019m still in my late 20\u2019s", "comment": "I just turned 40 and became a Cloud Engineer two weeks ago :)", "upvote_ratio": 890.0, "sub": "ITCareerQuestions"}1092{"thread_id": "uols8s", "question": "I don\u2019t know if there is a lot of ageism in it I don\u2019t look old I look like I\u2019m still in my late 20\u2019s", "comment": "Lol no.  I thought the same thing at 28 that I was too late in the game.  When you get up help desk you're gonna find people in there 50s-60s.   \n\nIT isn't some tech bro industry with open floor plans and ping pong tables in the break rooms.  Just a normal ass business like every other place.", "upvote_ratio": 870.0, "sub": "ITCareerQuestions"}1093{"thread_id": "uols8s", "question": "I don\u2019t know if there is a lot of ageism in it I don\u2019t look old I look like I\u2019m still in my late 20\u2019s", "comment": "I hope not! For my sake :P", "upvote_ratio": 230.0, "sub": "ITCareerQuestions"}1094{"thread_id": "uolu1c", "question": "what's the dumbest thing you believed as a kid?", "comment": "My dad told me he had hearing loss and couldn't hear me if I whined because my pitch would get too high. Would completely ignore me until I asked him questions in a normal voice. \nTrusted him implicitly until I was 12 and he yelled at my younger brother for whining.", "upvote_ratio": 77470.0, "sub": "AskReddit"}1095{"thread_id": "uolu1c", "question": "what's the dumbest thing you believed as a kid?", "comment": "Don't drink and drive meant all drinks.\n\nMy dad was super confused when I told him he wasn't allowed to have any soda until we got home.", "upvote_ratio": 41500.0, "sub": "AskReddit"}1096{"thread_id": "uolu1c", "question": "what's the dumbest thing you believed as a kid?", "comment": "That if it was raining where I was, it was raining everywhere in the world.", "upvote_ratio": 38920.0, "sub": "AskReddit"}1097{"thread_id": "uolvgs", "question": "Hey guys. I have always wanted to do something related with computers since I was really young (im 17 btw :)). About a year and a half ago or smth I decided that I want to do programming, more specifically web development or game development. I have done a course on udemy for web development and I know the basics of JS. When I started the course I still didnt know exactly what I wanted to choose further out of these 2 areas. A few months ago I fully decided that I want to do game development and started researching some universities. After finding a few interesting ones I've realised they do a selection process where they give u a theme and some tasks and you have to make a game. From what I understand it doesnt have to be the best game but its important that it works and that I comment and document my code and thinking process. Anyway what I would like to know is how do you guys think I should start learning c++ or if you have any tips on game development with c++. If u've reached the end of this long ass post ty for ur time and have a nice day :))", "comment": "www.learncpp.com is a great tutorial for learning modern C++.\n\nUse https://en.cppreference.com/w/ as a language reference.\n\nOnce you\u2019re comfortable with the language, you can learn about the proper practices using the [C++ Core Guidelines](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines).\n\nStay away from sites like GeeksForGeeks, TutorialsPoint, cplusplus.com, and most YouTube tutorials, as they\u2019re notorious for being outdated, having misinformation, and generally being of poor quality.", "upvote_ratio": 430.0, "sub": "cpp_questions"}1098{"thread_id": "uolvgs", "question": "Hey guys. I have always wanted to do something related with computers since I was really young (im 17 btw :)). About a year and a half ago or smth I decided that I want to do programming, more specifically web development or game development. I have done a course on udemy for web development and I know the basics of JS. When I started the course I still didnt know exactly what I wanted to choose further out of these 2 areas. A few months ago I fully decided that I want to do game development and started researching some universities. After finding a few interesting ones I've realised they do a selection process where they give u a theme and some tasks and you have to make a game. From what I understand it doesnt have to be the best game but its important that it works and that I comment and document my code and thinking process. Anyway what I would like to know is how do you guys think I should start learning c++ or if you have any tips on game development with c++. If u've reached the end of this long ass post ty for ur time and have a nice day :))", "comment": "Check out The Cherno on YouTube. Especially for the gaming stuff. \n\nAlso, Kate Gregory's talk \"don't teach C\" is a good one.", "upvote_ratio": 300.0, "sub": "cpp_questions"}1099{"thread_id": "uolvgs", "question": "Hey guys. I have always wanted to do something related with computers since I was really young (im 17 btw :)). About a year and a half ago or smth I decided that I want to do programming, more specifically web development or game development. I have done a course on udemy for web development and I know the basics of JS. When I started the course I still didnt know exactly what I wanted to choose further out of these 2 areas. A few months ago I fully decided that I want to do game development and started researching some universities. After finding a few interesting ones I've realised they do a selection process where they give u a theme and some tasks and you have to make a game. From what I understand it doesnt have to be the best game but its important that it works and that I comment and document my code and thinking process. Anyway what I would like to know is how do you guys think I should start learning c++ or if you have any tips on game development with c++. If u've reached the end of this long ass post ty for ur time and have a nice day :))", "comment": "I don't know where you're from and what kind of universities those are, but I would also be very weary before I pursued a degree in game development, even if I were 100% sure that I wanted to go in that direction.\n\nFrom all I've read even most (video) game development companies prefer to hire people with CS, Maths, Physics or Electrical engineering degrees over those with game development degrees. And if you want to change your career path later, because you've noticed that game development isn't for you, those degrees will make it even easier for you.\n\nI have a CS degree and we always had the possibility to make games during project works. So maybe ask that question on /r/cscareerquestions or write some e-mails to game development companies, you'd like to work for, if they actually value those degrees.\n\nAnyway I wish you good luck!", "upvote_ratio": 120.0, "sub": "cpp_questions"}1100{"thread_id": "uolyzi", "question": "Can someone please explain to me why  heritage in your ancestry is held in high regard and openly talked about with pride? \n\nIm from Germany and almost nobody cares (besides narrow minded idiots) about that.", "comment": "God damn fucking *Americans* and their...\n\n....\n\n...NOT SIMPLY MATERIALIZING OUT OF THE VOID AND HAVING ANCESTORS AND SHIT. FUCK.", "upvote_ratio": 650.0, "sub": "AskAnAmerican"}1101{"thread_id": "uolyzi", "question": "Can someone please explain to me why  heritage in your ancestry is held in high regard and openly talked about with pride? \n\nIm from Germany and almost nobody cares (besides narrow minded idiots) about that.", "comment": "You know how people of Turkish ancestry, even if they\u2019ve been in Germany for three generations are still called \u201cTurks?\u201d It\u2019s the opposite of that.", "upvote_ratio": 550.0, "sub": "AskAnAmerican"}1102{"thread_id": "uolyzi", "question": "Can someone please explain to me why  heritage in your ancestry is held in high regard and openly talked about with pride? \n\nIm from Germany and almost nobody cares (besides narrow minded idiots) about that.", "comment": "Don't Germans make more of heritage than us?  It's pretty widely accepted that a Turkish-American is an American.  Ditto for Irish-Americans, Mexican-Americans, etc. I have heard of people born and raised in Germany not being considered German because their grandparents were Turkish immigrants.\n\nAlso even though we talk about heritage politicizing it would be really weird.  It's mostly small talk, a hobby for genealogy and history buffs, and maybe a factor in planning a family vacation.", "upvote_ratio": 470.0, "sub": "AskAnAmerican"}1103{"thread_id": "uom0cq", "question": "For a little while there i was able to see the bottom half of the screen and only that half was responding to touch but now its completely black and not responding. I still get calls and texts and all that so it seems like the inside is good. \n\nWhat is my best option of recovering my data? I have a passcode so im not sure i can just plug it into my computer. \n\nIs it possible to access and retrieve my files from my secured folder if I am able to somehow get it connected to my computer?\n\nIf all else fails does anyone know how much it would cost to fix the screen. I dont know much about phones but i know it would include fixing the glass, lcd, and whatever makes it respond to touch. \n\nI really appreciate any help. I have some very sentimental things on my phone that id be willing to do alot to get back.", "comment": "This multi-times a day question again. No USB debugging enabled, not going to happen. No cloud sync, not going to happen. No Samsung with Samsung Dex, not going to happen.\n\nNo recovery from the secure folder that way either even if you had the first 2 working.\n\nGet it fixed, and no we don't know how much it's going to cost since you don't even mention a device model. It also depends on if just the glass needs replacing, or the digitizer too etc... Google can tell you an estimate", "upvote_ratio": 30.0, "sub": "AndroidQuestions"}1104{"thread_id": "uom3oa", "question": "Hi I would appreciate to ask IT people here about my scenario. Do you think it will be possible for me to get a career in the IT industry without an IT degree? I am currently studying Mechanical Engineering and it is my 4th year. I have some\u200f\u200f\u200e\u200f\u200f\u200e\u200f\u200f\u200e\u200f\u200f\u200e\u00adknowledge in programming *(basic to intermediate)* and started programming since 4th year High School. I have experienced programming for clients in Upwork and Freelancer but only for a year. I mostly self-study programming languages. And also partly interested in Cybersecurity (responsible disclosures). I have also read that certifications are a plus, I think I can study those for some time.. so any thoughts? ​ Thank you.", "comment": "I have a high school diploma and some certs, I\u2019m almost 3 years old in the IT field now. If I can do it, you can too.", "upvote_ratio": 50.0, "sub": "ITCareerQuestions"}1105{"thread_id": "uom4cd", "question": "If the world had a source code, what language(s) would it be written in ?", "comment": "[Lisp (actually most of it in Perl)](https://xkcd.com/224/)", "upvote_ratio": 120.0, "sub": "AskProgramming"}1106{"thread_id": "uom4cd", "question": "If the world had a source code, what language(s) would it be written in ?", "comment": "Brainfuck.", "upvote_ratio": 70.0, "sub": "AskProgramming"}1107{"thread_id": "uom4cd", "question": "If the world had a source code, what language(s) would it be written in ?", "comment": "Machine Language", "upvote_ratio": 60.0, "sub": "AskProgramming"}1108{"thread_id": "uom4xb", "question": "I'm a Filipino, silver medalist of the 2019 International Earth Science Olympiad, and currently a freshman in college. AMA! (including about the state of my country right now)", "comment": "So how does it feel that the son of a former dictator is your next ruler?", "upvote_ratio": 60.0, "sub": "AMA"}1109{"thread_id": "uom4xb", "question": "I'm a Filipino, silver medalist of the 2019 International Earth Science Olympiad, and currently a freshman in college. AMA! (including about the state of my country right now)", "comment": "What are you studying?\n\nWhat is your favourite dessert?", "upvote_ratio": 30.0, "sub": "AMA"}1110{"thread_id": "uom4xb", "question": "I'm a Filipino, silver medalist of the 2019 International Earth Science Olympiad, and currently a freshman in college. AMA! (including about the state of my country right now)", "comment": "Why do most Filipinos speak English well?", "upvote_ratio": 30.0, "sub": "AMA"}1111{"thread_id": "uom98r", "question": "What are the most painful things to do for you while setting up CI/CD on your project?", "comment": "Learning a new yaml/whatever syntax for the new hyped platform.", "upvote_ratio": 50.0, "sub": "AskProgramming"}1112{"thread_id": "uom98r", "question": "What are the most painful things to do for you while setting up CI/CD on your project?", "comment": "Credentials distribution.", "upvote_ratio": 30.0, "sub": "AskProgramming"}1113{"thread_id": "uomeo2", "question": "Hi Everyone! I recently implemented sha256 cryptographic hash function using C++. If you have some time please review my code. As I am new to C++ **any tips are appreciated**. Thx in advance. My [GitHub Repo](https://github.com/woXrooX/CPP_sha256)", "comment": "* Don't explicitly define the destructor unless you need to. If you need to define a destructor, remember the [rule of five/three/zero](https://en.cppreference.com/w/cpp/language/rule_of_three). Note: if want to force the compiler to generate a special member function, define it as `= default` rather than as an empty function.\n* Pass strings using `std::string_view`,  unless you need a null-terminated string.\n* If a function should not or will not throw, declare it as `noexcept`.\n* If a member function should not or will not modify any class members, declare it as `const`.\n* [Prefer the `{}`-initializer syntax](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-list). Avoid initializing fundamental types using `=`. Avoid the `()`-initializer syntax, unless you're initializing a container type with anything other than a list of elements.\n* Avoid raw arrays. For stack-allocated/fixed-size arrays, use `std::array`. For dynamic arrays, use `std::vector`, or one of the many other container types STL provides.\n* Avoid redundant uses of `this`. It adds nothing to the code, and might make the reader stop and think why the writer deemed it necessary.\n* Group related pieces of data into `struct`s.\n* Avoid C-style casts. If you must use a cast, use one of the named casts: `static_cast`, `dynamic_cast`, `const_cast`, or `reinterpret_cast`.\n* Avoid non-`static` `const` member variables. Prefer `static constexpr` or `static const`.", "upvote_ratio": 60.0, "sub": "cpp_questions"}1114{"thread_id": "uomeo2", "question": "Hi Everyone! I recently implemented sha256 cryptographic hash function using C++. If you have some time please review my code. As I am new to C++ **any tips are appreciated**. Thx in advance. My [GitHub Repo](https://github.com/woXrooX/CPP_sha256)", "comment": "There is the question of whether this even should be a class. A hash is really just a function. Given that an object really just stores a plain text and a hash, there is little point it it even being an object.\n\nFurther, you are storing your binary representations as \"plain text\" in strings. That is fairly inefficient, especially since it leads to a myriad of allocations.\n\nYou can do bitwise operations on chars/bytes directly. \n\nI will mostly ignore these two general considerations below an focus on the written C++ code.\n\nSo lets start at the top:\n\n>     #ifndef SHA256_H\n\nWhile that include guard is fine, I would give it a more unique name, or simply use `#pragma once`.\n\n>     Sha256(const std::string &data) : data(data)\n\nIgnoring the question of design, a constructor that is going to take a copy anyways, should take by value and then move into the member:\n\n    Sha256( std::string data_ ) \n       : data( std::move( data_ ) )\n\nThat way a user can actually move into your constructor and a void a copy.\n\n>     ~Sha256(){}\n\nis an antipattern. Whenever your destructor does nothing, it most likely should not exist. At most it should be defined as\n\n    ~Sha256() = default;\n\n>     std::string digest(){\n\nThis member function ought to return a `const std::string&` or a `std::string_view` and be `const` qualified. The name is also not great, because it implies the function would actually *do* something, where as it really just returns the already calculated hash.\n\n>     data_in_binary\n\nCould at least be `reserve`d, since oyu can calculate its size.\n\n>     i++\n\nIt is generally considered best practice to always use `++i` unless you want to do something with the post increment return value.\n\n>     this->\n\nThere is no need to preface every class member with a `this->`. In a well design class its just visual noise.\n\n>     std::string data_512_bit_chunks[data_512_bit_chunks_size];\n\nThis uses Variable-Length-Arrays. They are not a standard c++ feature and should not be used. Use `std::vector`\n\n>     std::string data_32_bit_words[data_512_bit_chunks_size][64];\n\nsame.\n\n>     uint32_t h0 = this->h0;\n>     ....\n>     uint32_t a = this->h0;\n>     ....\n\nThese scream for an array\n\n>     std::string result(ss.str());\n>     this->result = result;\n\nWhy this copy? You could just assign to `result` directly.\n\n>     const uint32_t h0 = 0x6a09e667;\n>     ...\n\nAll these are compile time constants, but you have them as members in every object.\n\nThey ought to be `constexpr static` instead of `const`.", "upvote_ratio": 30.0, "sub": "cpp_questions"}1115{"thread_id": "uompje", "question": "Forgive me for the noob question.\n\nCurrently, I work as a data analyst, mostly using SQL and SSRS.\n\nThe biggest challenge I face on a day-to-day basis is not my SQL knowledge being challenged but my deciphering skills. The hurdle to overcome is always the data. Big databases or datawarehouses with cryptic field names. Report requests from managers using the wrong terminology. Having to translate any request from what's being asked into how it actually is in the data.\n\nI am wondering if the experience of a software engineer is different.\n\nPrimarily, that any requests from \"customers\" are already translated into what they actually mean by the project manager. And also hoping that whatever codebase etc will be put together with more logic than a shitty database.\n\nBut maybe this is just wishful thinking.\n\nAnyone who has had experience of a more data focused position and a more programming focused position, do you find that you knowledge of programming is the biggest obstacle to overcome? Or are those other messy human factors like shitty data, poorly organised code, etc, still major factors?\n\nThanks", "comment": "lol if you find a company with nice clean data you send me their contact info right now so I can spend the rest of my life there", "upvote_ratio": 4830.0, "sub": "LearnProgramming"}1116{"thread_id": "uompje", "question": "Forgive me for the noob question.\n\nCurrently, I work as a data analyst, mostly using SQL and SSRS.\n\nThe biggest challenge I face on a day-to-day basis is not my SQL knowledge being challenged but my deciphering skills. The hurdle to overcome is always the data. Big databases or datawarehouses with cryptic field names. Report requests from managers using the wrong terminology. Having to translate any request from what's being asked into how it actually is in the data.\n\nI am wondering if the experience of a software engineer is different.\n\nPrimarily, that any requests from \"customers\" are already translated into what they actually mean by the project manager. And also hoping that whatever codebase etc will be put together with more logic than a shitty database.\n\nBut maybe this is just wishful thinking.\n\nAnyone who has had experience of a more data focused position and a more programming focused position, do you find that you knowledge of programming is the biggest obstacle to overcome? Or are those other messy human factors like shitty data, poorly organised code, etc, still major factors?\n\nThanks", "comment": "Nope. Clean, well structured data off the bat is not unheard of, but generally you have to make it so. Cryptic field names are especially common in legacy products. I encountered this gem in a MySQL database the other week:\n\n`charReqODSDescriptionVal VARCHAR(100) NOT NULL DEFAULT '0'`\n\nchar - What is this? Are we using Hungarian notation in our database here? It doesn't even match the field type... Get rid.\n\nReq - Again, being used to note that the field is NOT NULL is my best guess. Not necessary.\n\nODS - Nobody in the business could tell me what that stood for, if anything.\n\nVal - Yes, everything here is a value. That's kind of what databases do. Store values. Off with it.\n\nDEFAULT '0' - Why does a string value default to the string representation of an integer?\n\nDescription - Ah, now we're getting somewhere. This will be a short description sentence for this entity, surely...\n\nRan a query to see some values stored against this column. The values were all like this: `Title,An object to model Title data,123`\n\nCSV??? So this database is storing multiple data points (name, description, ???) in one column. That's not even 1NF. Brilliant. And we have no labels for those without digging through code, so I don't know what `123` means. Sure enough, the code was splitting and joining strings to read/write these fields...\n\n:/", "upvote_ratio": 1240.0, "sub": "LearnProgramming"}1117{"thread_id": "uompje", "question": "Forgive me for the noob question.\n\nCurrently, I work as a data analyst, mostly using SQL and SSRS.\n\nThe biggest challenge I face on a day-to-day basis is not my SQL knowledge being challenged but my deciphering skills. The hurdle to overcome is always the data. Big databases or datawarehouses with cryptic field names. Report requests from managers using the wrong terminology. Having to translate any request from what's being asked into how it actually is in the data.\n\nI am wondering if the experience of a software engineer is different.\n\nPrimarily, that any requests from \"customers\" are already translated into what they actually mean by the project manager. And also hoping that whatever codebase etc will be put together with more logic than a shitty database.\n\nBut maybe this is just wishful thinking.\n\nAnyone who has had experience of a more data focused position and a more programming focused position, do you find that you knowledge of programming is the biggest obstacle to overcome? Or are those other messy human factors like shitty data, poorly organised code, etc, still major factors?\n\nThanks", "comment": "If you've ever watched the reality show Hoarders then you have a good point of reference what coming into an existing codebase is like", "upvote_ratio": 590.0, "sub": "LearnProgramming"}1118{"thread_id": "uomwf3", "question": "I'm 23 and currently work in a call centre as a technical support agent. I am considering doing a CompTIA course bundle which consists of CompTIA A+, CompTIA Network+, CompTIA Security+, CompTIA Cloud +, CompTIA Cloud Essentials, CompTIA CASP+ (Advanced Security Practitioner), CompTIA CySA+ (Cybersecurity Analyst), CompTIA Pentest+, CompTIA Linux+ to try and find a better paying job. I was wondering if anyone could recommend any other certificates that would aid in getting me started in a career in IT.", "comment": "Do CCNA that a cert that brings value, will take you 2-3 months but is worth it.", "upvote_ratio": 30.0, "sub": "ITCareerQuestions"}1119{"thread_id": "uomxso", "question": "What\u2019s something you never want to hear after sex?", "comment": "Her saying \"you can stop\" in the most disappointed way possible", "upvote_ratio": 74410.0, "sub": "AskReddit"}1120{"thread_id": "uomxso", "question": "What\u2019s something you never want to hear after sex?", "comment": "\u201cYou\u2019re not as bad as everyone says\u201d", "upvote_ratio": 70590.0, "sub": "AskReddit"}1121{"thread_id": "uomxso", "question": "What\u2019s something you never want to hear after sex?", "comment": "\"Ok thanks everyone for tuning in! Don't forget to like and subscribe!!\"", "upvote_ratio": 46800.0, "sub": "AskReddit"}1122{"thread_id": "uon94b", "question": "Title says it all. \n\nI just quit the android 13 beta and after doing the system update, it completely reset itself.\n\nDoes anyone know why this happened or did i overread the line they said it in?", "comment": "Yeah that's normal when you opt out of the Beta.", "upvote_ratio": 40.0, "sub": "AndroidQuestions"}1123{"thread_id": "uonjqq", "question": "I found a link on another Reddit sub that I felt it was interesting enough to share with y\u2019all\u2026\n\nI figured some redditors here might enjoy diving into some [possible/plausible] IT related technical interview questions & answers.\n\n[https://www.fullstack.cafe/](https://www.fullstack.cafe/)", "comment": "Just search github:\n\nSite:github.com \"blahjobtitle interview questions\"", "upvote_ratio": 70.0, "sub": "ITCareerQuestions"}1124{"thread_id": "uonqww", "question": "Did an app purchase yesterday. I had some money on my Google acount due to my rewards activity.\n\nTo my surprise, the app purchase was deducted from my Google balance (from Rewards), yet I would not liked to use that (balance for the purchase) but my credit card instead.\n\nWhat did I miss during the purchase process???", "comment": "I'm not sure what you're asking here? You missed the part where you choose what payment methods to use, apparently lol.", "upvote_ratio": 60.0, "sub": "AndroidQuestions"}1125{"thread_id": "uonydm", "question": "Been hearing this phrase in regards to IDE\u2019s.\n\nAnyone care to elaborate.\n\nEx.) \u201cI started to us VScode for Python. It\u2019s lighter than PyCharm\u201d\n\nI\u2019ve been using PyCharm for python but typically use VScode for html/css for web design. \n\nThe example quote above was not something I said just to clarify just read a few comments on a separate subreddit and was curious.", "comment": "Lots of people complain that Visual Studio is heavy as it takes a few seconds to load. The say the like to use VS Code as it is faster to load. I am in the practical camp that starts VS once a day and therefore doesn't care.\n\nSometimes people also use heavy to mean that a software has lots of features they don't use and therefore feel better when the interface of an IDE is minimal to their need.", "upvote_ratio": 30.0, "sub": "AskComputerScience"}1126{"thread_id": "uoo5rf", "question": "While taking input in vector v.push_back() is faster as compared to cin>>v[I] why?", "comment": "These two statements are not equal. One appends a default constructed value to a vector, the other inserts a user input value into an array.\n\nThe first is superficially faster because the second blocks until the user has input a number. Likewise any I/O operation will likely be slower than push_back().", "upvote_ratio": 70.0, "sub": "cpp_questions"}1127{"thread_id": "uoo5rf", "question": "While taking input in vector v.push_back() is faster as compared to cin>>v[I] why?", "comment": "1. They dont do the same thing\n2. How did you meassure this?\n   1. Did you use an optimized build?\n   2. Did you meassure the IO in both cases?", "upvote_ratio": 40.0, "sub": "cpp_questions"}1128{"thread_id": "uoovb5", "question": "Why don't majority of Americans use Whatsapp?", "comment": "Because MMS and SMS come built into our phones and are free and offer any and all of the necessary features WhatsApp does.  \n\nI am baffled by how often this question gets asked, and wonder what kind of advertising they do that this is such a hot topic.", "upvote_ratio": 1080.0, "sub": "AskAnAmerican"}1129{"thread_id": "uoovb5", "question": "Why don't majority of Americans use Whatsapp?", "comment": "Because, unlimited SMS texting has been standard here for even the cheapest cell phone plans for 20 years now, so everyone just got used to using it rather than having to install another app.", "upvote_ratio": 430.0, "sub": "AskAnAmerican"}1130{"thread_id": "uoovb5", "question": "Why don't majority of Americans use Whatsapp?", "comment": "Free texting mate. Part of the phone, part of the plan.", "upvote_ratio": 350.0, "sub": "AskAnAmerican"}1131{"thread_id": "uop8kl", "question": "Offering insight to anyone about this controversial profession or just anything else you would like to know", "comment": "What's their success rate ?", "upvote_ratio": 30.0, "sub": "AMA"}1132{"thread_id": "uop8kl", "question": "Offering insight to anyone about this controversial profession or just anything else you would like to know", "comment": "Someone must have hung up on him, he\u2019s not answering.", "upvote_ratio": 30.0, "sub": "AMA"}1133{"thread_id": "uopdoa", "question": "I just want to start by saying this is a metropolitan area network between two cities in my country, and they are planning on hiring two new guys without experience one of those guys being me of course to handle everything regarding the network my only qualifications for this are my CCNA, and my Linux and Microsoft Certified System Administration self-studies and courses and I know people with experience in the field who recommended that I just take the job, and they are willing to help me with any questions, but I would still put myself in the extremely under-qualified department for something like this, yet I don't want to waste this opportunity to learn and gain experience, so is there any recommendations on how to prepare for something like this ?", "comment": "Uh, time to open up Packet Tracer and fiddle around, lol.", "upvote_ratio": 60.0, "sub": "ITCareerQuestions"}1134{"thread_id": "uopdoa", "question": "I just want to start by saying this is a metropolitan area network between two cities in my country, and they are planning on hiring two new guys without experience one of those guys being me of course to handle everything regarding the network my only qualifications for this are my CCNA, and my Linux and Microsoft Certified System Administration self-studies and courses and I know people with experience in the field who recommended that I just take the job, and they are willing to help me with any questions, but I would still put myself in the extremely under-qualified department for something like this, yet I don't want to waste this opportunity to learn and gain experience, so is there any recommendations on how to prepare for something like this ?", "comment": "How on earth did you pass the interview?  \nWhy on earth you agreed to do it if you don't know how?\n\nThere's a high probability you're gonna fuck up or you're gonna be stressed out beyond limits for weeks or months. I hope it goes well for you.\n\n​\n\nWill your friends, who advised you to take it, offer to help you at 10 PM on Friday to rescue you if something is messed up?", "upvote_ratio": 30.0, "sub": "ITCareerQuestions"}1135{"thread_id": "uopdso", "question": "This one might feel like a very noob query but why is it like when I declare a string say 'str' and assign characters to it like `str[0]='a';str[1]='b';` and so on, I can't use cout on this 'str' to get my output as `ab....` instead I need to write like `cout<<str[0]<<str[1];` to retrieve them character by character, I can't even assign this string to somewhere or pass it as an argument. \n\nThanks!", "comment": "As u/nysra points out, the \\[\\] operator needs to refer to a position that already exists in the string.   If you start with an empty string this is undefined behavior.\n\nWhat you want to do is:\n\nstr.push\\_back('a'); str.push\\_back('b');   \n\nThis grows the string by adding the character to the end.  Or you can do \n\nstr.append(\"ab\");\n\nwhich can also be written:\n\nstr += \"ab\";\n\nif you ever want to add more than one character at  a time.", "upvote_ratio": 60.0, "sub": "cpp_questions"}1136{"thread_id": "uopdso", "question": "This one might feel like a very noob query but why is it like when I declare a string say 'str' and assign characters to it like `str[0]='a';str[1]='b';` and so on, I can't use cout on this 'str' to get my output as `ab....` instead I need to write like `cout<<str[0]<<str[1];` to retrieve them character by character, I can't even assign this string to somewhere or pass it as an argument. \n\nThanks!", "comment": "Your string needs a length greater than what you're trying to index, otherwise your program contains UB and is invalid.\n\nhttps://godbolt.org/z/YvGEbPdhs", "upvote_ratio": 60.0, "sub": "cpp_questions"}1137{"thread_id": "uopdso", "question": "This one might feel like a very noob query but why is it like when I declare a string say 'str' and assign characters to it like `str[0]='a';str[1]='b';` and so on, I can't use cout on this 'str' to get my output as `ab....` instead I need to write like `cout<<str[0]<<str[1];` to retrieve them character by character, I can't even assign this string to somewhere or pass it as an argument. \n\nThanks!", "comment": "I would like to add that u should also definitely read through https://en.cppreference.com/w/cpp/string/basic_string; a detailed explanation of string and other standard libraries, with examples, are available on cppreference. If you have not read c++ references in my case a few times, for common containers like string or vector I would recommend. After that I'd playing around with them, than knowing when to use different containers for their best use case. As others have said assigning a container data directly, without proper checking is bad practice, so I assume you are learning. https://www.learncpp.com/ is also fantastic wish I knew of it when I was learning. I'm going to over recommend here but in my opinion if you are not on Linux I would highly recommend it for C/C++; it's more personal preference but the latest Debian with Gnome 40-42.1 is next level for productivity. Anyway I hope you enjoy this, if not oh well it will be solidified here for a while for anyone else. What a freaky world, happy Friday :)", "upvote_ratio": 30.0, "sub": "cpp_questions"}1138{"thread_id": "uophc9", "question": "I want to learn how to make software to organise files on my PC.\n\nI have a whole bunch of files on my PC and there is no way sort them by different attributes. I am just getting started on learning how to code and this problem looks like a good way to get started. So what technologies should I know about to get started with something like this?", "comment": "Shell scripts are the easiest way to manipulate files and folders, so long as your organization system isn't super complicated. Shell scripts aren't great for algorithms.\n\nhttps://www.nushell.sh/", "upvote_ratio": 30.0, "sub": "AskProgramming"}1139{"thread_id": "uopmlt", "question": "Don\u2019t be married too tightly to a tech stack or career path, you may miss out on something even cooler!\n\nI am a DevOps Engineer for a technology company that builds IOT devices. I never thought I would find my self in this position, and did not purposefully steer my career in this direction. Follows is a sort story about my career so far (5 YOE), and what I learned about diversifying my skill set.\n\nI feel like In this industry, it is easy to get silo\u2019s into a specific tech stack, language, framework, etc\u2026 If you are like me, you probably enjoy having all the answers. The problem with \u201csticking with what you know\u201d, is that there may be something even more interesting out there that you could be even more passionate about.\n\nWoe be to the highly specialized Engineer that never got their toes wet in a different field and found there true passion.\n\nWhen I first started out, I mainly sold my self as a Python developer with experience using Django. I really love Python, and Django too. I thought that I had explored enough different things to make the decision to specialize in only these technologies and everything that immediately surrounds them. While propping up several Django apps, I had learned quite a bit about DevOps. It did not strictly interest me though.\n\nThen came an offer that I couldn\u2019t refuse. With a few years of experience, I was about to double my Salary. But this was not a Python or Django position (although I still use Python with DevOps and IOT). I decided to leave my comfort zone and dive into the deep end of IOT DevOps. After sometime, I realized, holy cow! I am more happy then ever! I am learning way more, I am more productive, and generally, happier about my Career choice.\n\nTl;Dr - Don\u2019t be afraid to not specialize on the first tech stack / tech job that you learn. Just because you are comfortable with a technology, does not mean there isn\u2019t something better out there for you. Has this happened to anyone?", "comment": "Totally agree!!\n\nI don't know why, but there are a large amount of people who think that web development is all that exists. \n\nThere are so many different subfields out there, so many different technologies, so many different companies.\n\nI think that's one of the biggest reasons I don't regret getting my CS degree. It exposed me to so many different areas, whether theoretical or practical. Also my internships played a big part in that as well, I tried to do every internship in a different areas of CS, and it exposed me to a lot of things that I never knew existed.", "upvote_ratio": 120.0, "sub": "CSCareerQuestions"}1140{"thread_id": "uopmlt", "question": "Don\u2019t be married too tightly to a tech stack or career path, you may miss out on something even cooler!\n\nI am a DevOps Engineer for a technology company that builds IOT devices. I never thought I would find my self in this position, and did not purposefully steer my career in this direction. Follows is a sort story about my career so far (5 YOE), and what I learned about diversifying my skill set.\n\nI feel like In this industry, it is easy to get silo\u2019s into a specific tech stack, language, framework, etc\u2026 If you are like me, you probably enjoy having all the answers. The problem with \u201csticking with what you know\u201d, is that there may be something even more interesting out there that you could be even more passionate about.\n\nWoe be to the highly specialized Engineer that never got their toes wet in a different field and found there true passion.\n\nWhen I first started out, I mainly sold my self as a Python developer with experience using Django. I really love Python, and Django too. I thought that I had explored enough different things to make the decision to specialize in only these technologies and everything that immediately surrounds them. While propping up several Django apps, I had learned quite a bit about DevOps. It did not strictly interest me though.\n\nThen came an offer that I couldn\u2019t refuse. With a few years of experience, I was about to double my Salary. But this was not a Python or Django position (although I still use Python with DevOps and IOT). I decided to leave my comfort zone and dive into the deep end of IOT DevOps. After sometime, I realized, holy cow! I am more happy then ever! I am learning way more, I am more productive, and generally, happier about my Career choice.\n\nTl;Dr - Don\u2019t be afraid to not specialize on the first tech stack / tech job that you learn. Just because you are comfortable with a technology, does not mean there isn\u2019t something better out there for you. Has this happened to anyone?", "comment": "This almost happened to me.  My internship was working in a report generating language call RPG3.  Then my first real job was mostly report generating and SQL.  And then I couldn't find anything but another job with similar tech.\n\nBut with that job they where trying to do stuff with their report generator that it couldn't do, so I (arrogantly) offered to write them a report generator.  Back into real programming :)", "upvote_ratio": 30.0, "sub": "CSCareerQuestions"}1141{"thread_id": "uopoy5", "question": "I have seen there are several different career path one can take in IT field.\n\nPicture here : [https://i.imgur.com/NIVCU4P.png](https://i.imgur.com/NIVCU4P.png)\n\nPaths : Service and Infrastructure, Network Technology, IT Business and Strategy, IT Management, Information Securety, DevOps and Cloud Technology, Storage and Data, Software Development.\n\n​\n\nIm currently studying computer science and I dont know in which career I want to specialize or which subject might interest me.\n\nOne reason is that I had no time to do any projects whatsoever.\n\n​\n\nMy question is, what project can one make so that you can see whether that person might like the subject/career or not?\n\nSo projects for career path like \"Cloud technology\" or \"IT Management\".\n\nI think that project should then be beginner-friendly and at the same time cover many areas so that you can see early whether you will like it or not.", "comment": "Those early career points in this roadmap will be about learning core technologies, with time, experience and business/interpersonal skills pushing you forward.\n\nIf you want to learn about networking, you can download Cisco Packet Tracer and download/study free labs from someone like Jeremy\u2019s IT Lab on YT.\n\nIf you want to learn Cloud (and Linux by extension) take advantage of free AWS and Azure hours. Spin up some cloud VMs (Linux and Windows Server) and storage buckets and build your own labs. \n\nRemember, YMMV because there will always be a difference between how simple or elegant a technology product is designed, and how it\u2019s implemented into an organization\u2019s systems.", "upvote_ratio": 300.0, "sub": "ITCareerQuestions"}1142{"thread_id": "uopoy5", "question": "I have seen there are several different career path one can take in IT field.\n\nPicture here : [https://i.imgur.com/NIVCU4P.png](https://i.imgur.com/NIVCU4P.png)\n\nPaths : Service and Infrastructure, Network Technology, IT Business and Strategy, IT Management, Information Securety, DevOps and Cloud Technology, Storage and Data, Software Development.\n\n​\n\nIm currently studying computer science and I dont know in which career I want to specialize or which subject might interest me.\n\nOne reason is that I had no time to do any projects whatsoever.\n\n​\n\nMy question is, what project can one make so that you can see whether that person might like the subject/career or not?\n\nSo projects for career path like \"Cloud technology\" or \"IT Management\".\n\nI think that project should then be beginner-friendly and at the same time cover many areas so that you can see early whether you will like it or not.", "comment": "Oh boy, that\u2019s a hard one.\n\nIf you want as close to a magic bullet as I can think of, try building a webapp, hosting it publicly on AWS, deployed with Azure DevOps.\n\nYou\u2019ll have to learn a moderate amount of cloud administration/infrastructure, DevOps, Application Security, development, data management, etc.\n\n\nNo project is going to check every box, but I think that project might touch enough so that you might be able to dig into something deeper depending on what you like.", "upvote_ratio": 150.0, "sub": "ITCareerQuestions"}1143{"thread_id": "uopoy5", "question": "I have seen there are several different career path one can take in IT field.\n\nPicture here : [https://i.imgur.com/NIVCU4P.png](https://i.imgur.com/NIVCU4P.png)\n\nPaths : Service and Infrastructure, Network Technology, IT Business and Strategy, IT Management, Information Securety, DevOps and Cloud Technology, Storage and Data, Software Development.\n\n​\n\nIm currently studying computer science and I dont know in which career I want to specialize or which subject might interest me.\n\nOne reason is that I had no time to do any projects whatsoever.\n\n​\n\nMy question is, what project can one make so that you can see whether that person might like the subject/career or not?\n\nSo projects for career path like \"Cloud technology\" or \"IT Management\".\n\nI think that project should then be beginner-friendly and at the same time cover many areas so that you can see early whether you will like it or not.", "comment": "No project you can do on your own will really give you a good understanding of what any of these paths are like \"on the job\". You can only trust other people's accounts of what it's like. For example, software engineering professionally is only really about 50% heads down coding. The other 50% is code review, gathering requirements, system design meetings, this kind of stuff. Read people's accounts of how their day-to-day is in these different positions.\n\nMost importantly you must know that you don't have to make this decision now. There is plenty of time in the future to specialize. Focus on learning the fundamentals of computing right now, which is what you're doing with your comp sci degree. Once you have an entry level role you can talk to people in the different specialties and focus in on one thing.", "upvote_ratio": 110.0, "sub": "ITCareerQuestions"}1144{"thread_id": "uoptyx", "question": "If glass blocks infrared, why do greenhouses get so hot?", "comment": "In simple terms: Visible light passes through and heats up the interior.\nThings inside get hot and radiate that heat away as infrared light. The greenhouse blocks the infrared light from passing back through, keeping that heat inside.\n\nAll light heats things up, not just infrared light. So visible light from the sun is the driver of the heat increase inside the greenhouse.", "upvote_ratio": 150.0, "sub": "AskScience"}1145{"thread_id": "uoptyx", "question": "If glass blocks infrared, why do greenhouses get so hot?", "comment": "The Sun's spectrum peaks in the visible, so sunlight gets through and hits things inside the greenhouse.  That's about 1kW per square meter, so those things heat up, and  warm the air too, but that's all trapped.  \n\nI'm pretty sure most of the warming from a greenhouse comes from that simple fact;  let the sunlight in, reduce the airflow.\n\nYou mentioned the infrared, though, which is also relevant to the thermal picture.  The stuff inside the greenhouse also radiates in the far infrared, more and more according to Planck's blackbody radiation law as it all continues to heat up.  That law tells us that near room temperature the blackbody radiation peaks at about 10 microns wavelength... which the glass absorbs.   The thing is, the glass also re-emits according to its own temperature, and the outside is getting cooled by the ambient air, so at best you'll get a little extra warming if there's a temperature gradient across the glass from the inside surface to the outside surface.   Glass is not a great insulator, though, so that temperature gradient is unlikely to be huge.  This is why double-pane windows are popular and why a double-wall greenhouse, or even one made from two layers of plastic with an air barrier between them, should let the things inside get much warmer.", "upvote_ratio": 80.0, "sub": "AskScience"}1146{"thread_id": "uoptyx", "question": "If glass blocks infrared, why do greenhouses get so hot?", "comment": "Glass blocks SOME infrared wavelengths but not all.\n\nGlass blocks mid to far infrared, but not near infrared. That is, normal soda-lime glass doesn't block much until the wavelength is over about 2700 nm. Visible light is 380 to 700 nm.  So, infrared energy between 700 and 2700 nm passes through glass almost as well as visible light. And, almost all the Suns infrared energy output is above 2700 nm. So the suns infrared energy contributes a lot to the heating of a green house (visible and infrared light probably contribute about the same amount to the heating).\n\nComing from objects at maybe 30C (85F), the infrared energy trying to escape the greenhouse is at a much longer wavelength, around 10,000 nm. This wavelength doesn't pass through glass, and this is why thermal cameras can't see through glass (at normal earth surface temperatures).", "upvote_ratio": 40.0, "sub": "AskScience"}1147{"thread_id": "uoq003", "question": "Speed Cameras\n\nWith America being renown for their rights I am curious. Do you have speed cameras similar to most other nations or does your constitutional forbid it as in order to get a fine it has to be an actual cop ie you must face your accuser sort of thing?", "comment": "Some states banned speed camera, but some states have them. I know nyc has speed camera, but are illegal in jersey", "upvote_ratio": 140.0, "sub": "AskAnAmerican"}1148{"thread_id": "uoq003", "question": "Speed Cameras\n\nWith America being renown for their rights I am curious. Do you have speed cameras similar to most other nations or does your constitutional forbid it as in order to get a fine it has to be an actual cop ie you must face your accuser sort of thing?", "comment": "Some states have outlawed them, same with cameras at stoplights to catch incomplete stops. The ticket has to be issued to a driver, not a vehicle.", "upvote_ratio": 30.0, "sub": "AskAnAmerican"}1149{"thread_id": "uoq3je", "question": "Since 1215, the Catholic Church has banned consanguinity to the fourth degree. Several hundred years later, the Catholic Habsburgs would go against this rule multiple times, to the extent of marrrying nieces. What enabled the Habsburgs to get away with this for so long? How did the church react?", "comment": "It's an easy answer and perhaps quite obvious on reflection: the Church knew about each marriage in advance and gave permission. For a fee.\n\nWhile certain marriages were considered to be against natural law and would never be permitted, such as marriage between a grandparent and grandchild, or parent and child, money and power could get you permission from Rome for many things.\n\nThe marriages banned by natural law extended to spiritual family too, a godparent would not be permitted to marry a godchild. This could actually be used to facilitate a ~~divorce~~ *an anullment*, something that was otherwise hard to obtain. If a parent became the godparent of their own child then they could claim an illegal cosanguinity in their marriage and be granted a nullification.\n\nHenry VIII used the laws of cosanguinity to declare Mary Tudor illegitimate by 'discovering' that he and Catherine of Aragon were in fact related due to her previous marriage to his brother, Arthur. In fact, in order to form this leviratic marriage Henry had already requested and received (read purchased) permission from the Vatican.  But Mary Tudor was her father's daughter in many ways. Later, at her own expense, she purchased another leviratic dispensation for her father's marriage and so legitimised herself once again.\n\nThis illustrates quite well that a system was in place to permit marriages, and also shows that the system could be manipulated to various ends by those with the power to do so.\n\nGetting back to the Habsburgs... they also purchased leviratic dispensations in order to protect the family lineage and, of course, to avoid diluting power. In their case this was so prolonged and oft-repeated that it caused the end of the Spanish Habsburg line at the end of the 17th century.\n\n*The Church, Sanguinity and Trollope, Durey J, 2008*\n\n*Royal dynasties as human inbreeding laboratories: the Habsburgs, Alvarez G, Ceballos F C, 2013*", "upvote_ratio": 500.0, "sub": "AskHistorians"}1150{"thread_id": "uoq3je", "question": "Since 1215, the Catholic Church has banned consanguinity to the fourth degree. Several hundred years later, the Catholic Habsburgs would go against this rule multiple times, to the extent of marrrying nieces. What enabled the Habsburgs to get away with this for so long? How did the church react?", "comment": "[removed]", "upvote_ratio": 70.0, "sub": "AskHistorians"}1151{"thread_id": "uoq4gl", "question": "What was the craziest political scandal to happen in your state?", "comment": "\u201cHiking on the Appalachian Trail.\u201d\n\n~EDIT- for those who don\u2019t remember or are otherwise unaware. Mark Sanford, while Governor of South Carolina as a family values conservative Republican, disappeared for a week.  He apparently didn\u2019t inform anyone in the state government he was going to be away. His office told enquirers he was hiking on the Appalachian Trail.  Turns out he was in Argentina. With his soul mate.  Who was not his wife and mother of his children.", "upvote_ratio": 1550.0, "sub": "AskAnAmerican"}1152{"thread_id": "uoq4gl", "question": "What was the craziest political scandal to happen in your state?", "comment": "I think one thing we Pennsylvanians can agree on is that our state government is crooked as shit. I\u2019m sure there\u2019s plenty of scandals I\u2019m missing, but probably one of the more famous scandals was the State Treasurer R. Budd Dwyer. He was accused of bribery, conspiracy, mail fraud, and a few other counts. Prison was inevitable for him. A few days before he was to be sentenced, he called a press conference. At the conference, he pulled a revolver and shot himself on live TV. \n\nThere\u2019s a song by the band Filter called \u201cHey Man Nice Shot\u201d and supposedly that was the inspiration for the song.", "upvote_ratio": 850.0, "sub": "AskAnAmerican"}1153{"thread_id": "uoq4gl", "question": "What was the craziest political scandal to happen in your state?", "comment": "I wanted to say McGreevey but then I realized a former Vice President literally shot and killed the Secretary of Treasury in Weehawken.", "upvote_ratio": 700.0, "sub": "AskAnAmerican"}1154{"thread_id": "uoq4sw", "question": "It's not the first time that i see a comment like this, even though nobody ever said this to me i actually want to know why would calling another person poor would be a offensive thing? (I know that not all Americans are like this)\n\nBut in my culture nobody calls another person poor in a offensive way because it doesn't make sense, just imagine walking around and some colleague says that your shoe is bad and you are a broke mf, wtf?\n\nhttps://imgur.com/a/PjYI4nH", "comment": "> in my culture nobody calls another person poor in a offensive way\n\nI don't believe you.", "upvote_ratio": 5980.0, "sub": "AskAnAmerican"}1155{"thread_id": "uoq4sw", "question": "It's not the first time that i see a comment like this, even though nobody ever said this to me i actually want to know why would calling another person poor would be a offensive thing? (I know that not all Americans are like this)\n\nBut in my culture nobody calls another person poor in a offensive way because it doesn't make sense, just imagine walking around and some colleague says that your shoe is bad and you are a broke mf, wtf?\n\nhttps://imgur.com/a/PjYI4nH", "comment": "There\u2019s zero discrimination or bullying against the poor where you live? Where is this social utopia?", "upvote_ratio": 3100.0, "sub": "AskAnAmerican"}1156{"thread_id": "uoq4sw", "question": "It's not the first time that i see a comment like this, even though nobody ever said this to me i actually want to know why would calling another person poor would be a offensive thing? (I know that not all Americans are like this)\n\nBut in my culture nobody calls another person poor in a offensive way because it doesn't make sense, just imagine walking around and some colleague says that your shoe is bad and you are a broke mf, wtf?\n\nhttps://imgur.com/a/PjYI4nH", "comment": "It's not your colleague doing that, not unless your workplace is insane levels of toxic. It's a drunk guy picking a fight, it's a teenager looking to make themselves look better by putting down their peers (it doesn't work, but teens are still figuring this stuff out), it's asshole looking to offend for their own personal reasons. And if it's on reddit, it's who knows who hiding behind the anonymity of the platform. \n\nBroke and poor can absolutely be insults. So can rich. Middle class, low class, high class can be too. Honestly, if you get the tone right, anything can be an insult.", "upvote_ratio": 2050.0, "sub": "AskAnAmerican"}1157{"thread_id": "uoq7ra", "question": "Both int(1.9999999999999999999) and math.floor(1.9999999999999999999) return 2.  I'm trying to figure out how to just chop off the decimal part no matter what is on the right side.  \n\nThanks for any help.", "comment": "Be a savage, cast to string and keep only what\u2019s to the left of the decimal point", "upvote_ratio": 3350.0, "sub": "LearnPython"}1158{"thread_id": "uoq7ra", "question": "Both int(1.9999999999999999999) and math.floor(1.9999999999999999999) return 2.  I'm trying to figure out how to just chop off the decimal part no matter what is on the right side.  \n\nThanks for any help.", "comment": "I recommend reading this [https://realpython.com/python-rounding/](https://realpython.com/python-rounding/)\n\n    >>> from decimal import Decimal\n    >>> import math\n    >>> a = Decimal(\"1.9999999999999999999\")\n    >>> math.trunc(a)\n    1", "upvote_ratio": 2190.0, "sub": "LearnPython"}1159{"thread_id": "uoq7ra", "question": "Both int(1.9999999999999999999) and math.floor(1.9999999999999999999) return 2.  I'm trying to figure out how to just chop off the decimal part no matter what is on the right side.  \n\nThanks for any help.", "comment": "Your value of 1.9999999999999999999 is probably being represented as 2.0 due to [floating-point inaccuracies](https://floating-point-gui.de/). Not much you can do about it. Even /u/n3buchadnezzar's solution won't handle that value, since the issue occurs in its representation before any conversion functions.\n\n    >>> from decimal import Decimal\n    >>> import math\n    >>> a = Decimal(1.9999999999999999999)\n    >>> a\n    Decimal('2')\n    >>> math.trunc(a)\n    2\n\nI am assuming that this is more of a theoretical question, rather than an \"I have this specific value in my data and need to handle it\" question.\n\nEdit: I just noticed that /u/n3buchadnezzar used a string version of your value, which circumvents the initial representation. Nice.", "upvote_ratio": 880.0, "sub": "LearnPython"}1160{"thread_id": "uoqdjn", "question": "I've been able to taste songs since i can remember, and I've never really figured out why. AMA", "comment": "How much acid did your mum drop whilst she was pregnant?", "upvote_ratio": 260.0, "sub": "AMA"}1161{"thread_id": "uoqdjn", "question": "I've been able to taste songs since i can remember, and I've never really figured out why. AMA", "comment": "What songs taste sweet? What songs taste sour? What songs taste salty? What songs taste bitter? What songs have a savory flavor?", "upvote_ratio": 80.0, "sub": "AMA"}1162{"thread_id": "uoqdjn", "question": "I've been able to taste songs since i can remember, and I've never really figured out why. AMA", "comment": "How does \"Hej, soko\u0142y\", that Polish folk song, taste like? And in general, how do war songs taste like?", "upvote_ratio": 60.0, "sub": "AMA"}1163{"thread_id": "uoqfqc", "question": ".", "comment": "That's a question that just doesn't have a generic answer. Life in Chicago vs Cincinnati vs Indianapolis vs rural Illinois or Iowa is a wide disparity. Life downstate from Chicago revolves around farms and college towns like Champaign and Urbana. Corporate headquarters in Chicago are Boeing (moving soon), McDonald's, Allstate, United Airlines, Hyatt Hotels, John Deere, Accenture, Caterpillar, Conagra Brands and many more. Or you might look at Cedar Rapids Iowa population 133,000 where around 10,000 of those work at Collins Aerospace as white collar engineers. [Things that surprised a New Yorkers first trip to the Midwest](https://www.insider.com/things-that-surprised-new-yorker-about-midwest-2021-6)", "upvote_ratio": 550.0, "sub": "AskAnAmerican"}1164{"thread_id": "uoqfqc", "question": ".", "comment": "We have a massive lack of lawyers, which is a pretty specific problem. Most are retiring, and younger law school graduates move to the cities or other states.\n\n\n\nSomeone willing to stick around here and practice in almost any area can basically pick any area of law they want to practice, pick their hours, and make good money.", "upvote_ratio": 450.0, "sub": "AskAnAmerican"}1165{"thread_id": "uoqfqc", "question": ".", "comment": "Despite what this sub says sometimes, the Midwest is a huge place with a lot of different things going on. Job opportunities in Chicago will be very different than in a small town, etc. A lot of Midwestern states have bigger cities with good jobs and stuff to do. You might want to narrow down what state you're interested in and whether you want to know about urban life, the suburbs, rural areas, etc.", "upvote_ratio": 170.0, "sub": "AskAnAmerican"}1166{"thread_id": "uoqg51", "question": "We need to reform the job hunting /job matching process. I don't know how but surely there are better ways than the current way we do things.", "comment": "It's an infuriating process yes, I recently was asked to do a coding challenge before an initial interview, I was a bit intrigued so I told them to send it over, expected it to be a short competence test but it was expecting me to fully create an app with functions.\n\nWhat kind of arrogant company expects that before even giving me (or others) a look in, I didn't even know if I wanted the job, they were just some small company in London, nothing impressive really.\n\nI told them to fuck off in nicer words.", "upvote_ratio": 4070.0, "sub": "CSCareerQuestions"}1167{"thread_id": "uoqg51", "question": "We need to reform the job hunting /job matching process. I don't know how but surely there are better ways than the current way we do things.", "comment": "If a company needs what you provide badly then the hiring process changes. Same with military recruitment, or anything really.", "upvote_ratio": 3230.0, "sub": "CSCareerQuestions"}1168{"thread_id": "uoqg51", "question": "We need to reform the job hunting /job matching process. I don't know how but surely there are better ways than the current way we do things.", "comment": "The companies benefit from making job hunting miserable. \n\nPeople job hop less, get less competing offers, so salaries stagnate.\n\nif people think that's not part of the reason why, they should read on how big tech companies got sued for agreeing to not compete and hire from each other to lower salaries", "upvote_ratio": 1540.0, "sub": "CSCareerQuestions"}1169{"thread_id": "uoqggo", "question": "Do you tend to mention countries that no longer exist?", "comment": "I still say Czechoslovakia.", "upvote_ratio": 1860.0, "sub": "AskOldPeople"}1170{"thread_id": "uoqggo", "question": "Do you tend to mention countries that no longer exist?", "comment": "No, but I can beat younger folks when we play old editions of trivial pursuit with lots of history questions answered with \u201cthe Soviet Union.\u201d\n\nI still say \u201cBurma\u201d although the military coup that took it over changed the name to Myanmar in 1989. \n\nAnd of course Istanbul was Constantinople but that's nobody's business but the Turks.", "upvote_ratio": 1220.0, "sub": "AskOldPeople"}1171{"thread_id": "uoqggo", "question": "Do you tend to mention countries that no longer exist?", "comment": "I think some of the old names sound so exotic that I almost wish they weren't changed. Siam, Persia, Ceylon, even Byzantium (to continue the Instanbul thing) kind of strike a romantic chord in me, which the new names don't.\n\nBut except for joking, no I don't use the old names.", "upvote_ratio": 620.0, "sub": "AskOldPeople"}1172{"thread_id": "uoqrvp", "question": "Edit: Thank you for all the replies. I decided to drop the psychologist. I don't know if I'll search for a new one.", "comment": "If your psychologist is telling stories about themselves, you need a new one. In four years of working with the same therapist, I don't even know how many kids she has or where she's from originally.", "upvote_ratio": 38300.0, "sub": "NoStupidQuestions"}1173{"thread_id": "uoqrvp", "question": "Edit: Thank you for all the replies. I decided to drop the psychologist. I don't know if I'll search for a new one.", "comment": "Dont worry about seeming rude. Setting a boundary for yourself is something he should praise you for honestly, its an important skill. If that's a problem, on top of him using your time to talk about himself, there's a much better therapist out there for you somewhere else", "upvote_ratio": 7520.0, "sub": "NoStupidQuestions"}1174{"thread_id": "uoqrvp", "question": "Edit: Thank you for all the replies. I decided to drop the psychologist. I don't know if I'll search for a new one.", "comment": "Doctor here. Find a different psychologist. This person isn\u2019t performing their duty in addressing your psychiatric needs. \n\nThe patient should absolutely NEVER feel like they\u2019re at risk of being rude by telling their mental health expert to shut up and help them. You\u2019re getting screwed, find somebody else.\n\nEdit: I do not agree with this person abandoning their therapy altogether. Therapy isn\u2019t a one-size-fits all kind of thing, sometimes you have to try different therapists, different strategies, treatment modalities, etc. We can all benefit from some professional outside perspective in life. Giving up on it is the worst thing you could do.", "upvote_ratio": 6960.0, "sub": "NoStupidQuestions"}1175{"thread_id": "uor29p", "question": "I am seeking a remote job and am looking for someone who actually works for these companies (that are hiring)  and can give me honest feedback about work expectations, demand, stress level etc.\n\nI have 11 years experience in IT and am looking to move to remote for anything paying 65k+ can anyone out there assist?", "comment": "You\u2019re not giving us much context in your post. What types of positions are you look for? What is your current job title? What skills do you have to offer? \n\n$65k+ is a bit low for 11 years of experience. You should really be trying for $150k+. I have about the same amount of experience and I\u2019m in the $150k+ range. \n\nWhen I interview with companies I\u2019m pretty upfront about making sure the job meets my expectations in terms of stress, on call rotations, what teams I\u2019ll be working with, and anything else I might want to know. I\u2019m sure every company will tell you they\u2019re low stress and etc. but you\u2019ll need to gauge it yourself. \n\nThe other big piece to this is being able to set boundaries. A lot of people in IT say they are overwhelmed with work and sometimes it\u2019s not because of the work itself but because of the fact that they don\u2019t know how to say no when they already have too much on their plate. \n\nI\u2019ve interviewed at a few places recently, Kickstarter and Door Dash, I spoke with hiring managers from both and they seem like decent places to work. Kickstarter only has 4 day work weeks and has flex hours, Door Dash has flex hours and seems pretty relaxed. Both jobs pay in the mid $100k, I was interviewing for infrastructure/Cloud engineering positions.", "upvote_ratio": 130.0, "sub": "ITCareerQuestions"}1176{"thread_id": "uor2e6", "question": "In 1990, 71% of Ukrainians voted to preserve the USSR. A year later, 92% of Ukrainians voted for independence. Why the turn of events?", "comment": "Gonna do a repost of a [repost](https://www.reddit.com/r/AskHistorians/comments/tlz1gj/why_did_the_ukrainian_sovereignty_referendum_of/i1xhccx/).\n\nFrom a previous [answer](https://www.reddit.com/r/AskHistorians/comments/m227lr/i_always_believed_the_soviet_union_fell_apart_due/gql70qm/) I wrote:\n\nThe referendum in question was held on March 17, 1991, and was worded as follows:\n\n>\u0421\u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u043b\u0438 \u0412\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0421\u043e\u044e\u0437\u0430 \u0421\u043e\u0432\u0435\u0442\u0441\u043a\u0438\u0445 \u0421\u043e\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0420\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a \u043a\u0430\u043a \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u043e\u0439 \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0432\u043d\u043e\u043f\u0440\u0430\u0432\u043d\u044b\u0445 \u0441\u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u0432 \u043f\u043e\u043b\u043d\u043e\u0439 \u043c\u0435\u0440\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0430\u0432\u0430 \u0438 \u0441\u0432\u043e\u0431\u043e\u0434\u044b \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u043b\u044e\u0431\u043e\u0439 \u043d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438?\n\nWhich can be translated to English as:\n\n>\"Do you consider necessary the preservation of the Union of Soviet Socialist Republics as a renewed federation of equal sovereign republics in which the rights and freedom of an individual of any ethnicity will be fully guaranteed?\"\n\nA couple things of note: the referendum was not held in six of the fifteen republics (Lithuania, Latvia, Estonia, Moldova, Georgia and Armenia). All of these except Armenia had basically elected non-communist governments in republican elections the previous year, and Lithuania had even declared independence in March 1990. Latvia and Estonia held referenda endorsing independence two weeks before the Soviet referendum, and Georgia held a similar referendum two weeks after. So even holding the vote was a fractured, not Union-wide affair. \n\nIt's also important to note the language of the referendum was for a *renewed federation of equal sovereign republics*. This may sound like a platitude, but effectively what it means is \"do you support President Gorbachev renegotiating a new union treaty to replace the 1922 USSR Treaty?\" \n\nThe background here is that after the end of the Communist Party's Constitutional monopoly on power and subsequent republican elections in 1990, the Soviet Socialist Republics, even those controlled by the Communist Party cadres, began a so-called \"war of laws\" with the Soviet federal government, with almost all republics declaring \"sovereignty\". This was essentially a move not so much at complete independence but as part of a political bid to renegotiate powers between the center and the republics. \n\nGorbachev in turn agreed to  this renegotiation, and began the so-called \"Novo-Ogaryovo Process\", whereby Soviet representatives and those of nine republics (ie, not the ones who boycotted the referendum) met from January to April 1991 to hash out a treaty for a new, more decentralized federation to replace the USSR (the proposed \"Union of Soviet Sovereign Republics\" is best understood as something that was kinda-sorta maybe like what the EU has become, in terms of it being a collection of sovereign states that had a common presidency, foreign policy and military). Even the passage of the referendum in the participating nine republics wasn't exactly an unqualified success: Russia and Ukraine saw more than a quarter of voters reject the proposal, and Ukraine explicitly added wording to the referendum within its borders that terms for the renegotiated treaty would be based on the Ukrainian Declaration of State Sovereignty, which stated that Ukrainian law could nullify Soviet law. \n\nThat second question, presented to Ukrainian voters, was worded: \n\n>\"Do you agree that Ukraine should be part of a Union of Soviet Sovereign States on the basis on the Declaration of State Sovereignty of Ukraine?\"\n\nAnd interestingly it got *more* yes votes than the first Union-wide question - the OP figures are actually for the second question, while the first question got 22,110,889 votes, or 71.48%.\n\nIn any event, the treaty was signed by the negotiating representatives on April 23, and went out to the participating republics for ratification (Ukraine's legislature refused to ratify), and a formal adoption ceremony for the new treaty was scheduled to take place on August 20. \n\nThat never happened, because members of Gorbachev's own government launched a coup the previous day in order to prevent the implementation of the new treaty. The coup fizzled out after two days, but when Gorbachev returned to Moscow from house arrest in Crimea, he had severely diminished power, and Russian President Boris Yeltsin (who publicly resisted the coup plot) had vastly increased power, banning the Communist Party on Russian territory, confiscating its assets, and pushing Gorbachev to appoint Yeltsin picks for Soviet governmental positions.", "upvote_ratio": 1150.0, "sub": "AskHistorians"}1177{"thread_id": "uor59v", "question": "Which comedy film never fails to make you laugh?", "comment": "What we do in the shadows. Gets me every single time", "upvote_ratio": 19490.0, "sub": "AskReddit"}1178{"thread_id": "uor59v", "question": "Which comedy film never fails to make you laugh?", "comment": "Blazing Saddles", "upvote_ratio": 16490.0, "sub": "AskReddit"}1179{"thread_id": "uor59v", "question": "Which comedy film never fails to make you laugh?", "comment": "Office Space, it never fails to make me laugh, especially the traffic jam scene when the guy is walking faster in his walker.", "upvote_ratio": 13360.0, "sub": "AskReddit"}1180{"thread_id": "uoraop", "question": "I have to imagine lots of people drink alcohol before finding out that they are pregnant.  Shouldn't this cause more issues with the baby's development?  Isn't this the critical time for development when it could have the most effect on the baby?", "comment": "[removed]", "upvote_ratio": 15120.0, "sub": "AskScience"}1181{"thread_id": "uoraop", "question": "I have to imagine lots of people drink alcohol before finding out that they are pregnant.  Shouldn't this cause more issues with the baby's development?  Isn't this the critical time for development when it could have the most effect on the baby?", "comment": "The answer is that at low and moderate levels of use in early stages of pregnancy, the studies are not as conclusive as one would like. Fetal Alcohol Syndrome is absolutely a thing and the more one drinks in pregnancies, especially at higher usages, the more likely it is to occur. Less conclusively known is what happens at very low, low and moderate ranges, mostly because scientists can't do studies on this the way that they would for other behaviors (because it would be unethical to encourage women to drink during pregnancy, knowing it can lead to fetal alcohol syndrome and other complications). There are people who take a variety of positions--Emily Oster, somewhat controversially, goes into this in her book, Expecting Better, and concludes that it is safe to occasionally have a drink while pregnant based on the studies that have been conducted. Other studies (ex: [here](https://ajp.psychiatryonline.org/doi/10.1176/appi.ajp.2020.20010086)) take the position that any alcohol at all should be avoided, and they do this by looking at broad ranges of women and asking questions about their usage prior to and during pregnancy (although the questions are often asked after the fact, so the self-reporting may not be entirely accurate).", "upvote_ratio": 7500.0, "sub": "AskScience"}1182{"thread_id": "uoraop", "question": "I have to imagine lots of people drink alcohol before finding out that they are pregnant.  Shouldn't this cause more issues with the baby's development?  Isn't this the critical time for development when it could have the most effect on the baby?", "comment": "There's lots of conflicting info here and a lot of it comes down to there not being many studies on pregnant women because of ethics. Pretty much every drug, prescription or over the counter, says not to take it when pregnant not because there's any proof it's harmful but there isn't any proof it's not. Most of the medical info we do have is from retrospective questionnaires and the results of those are very hard to confirm.\n\nSorry if that doesn't help.", "upvote_ratio": 1860.0, "sub": "AskScience"}1183{"thread_id": "uorgoq", "question": "Hello everyone, \n\nI have been working for a year as Desktop Support and my manager has recently asked me that he would want me to move to a Field tech position in few months. \nI have a bachelor in CS and the field tech requirement is HS diploma or GED. \n\nDoes this make sense at all?", "comment": "Their requirements don't make sense but the move should be what you want to do.  Field tech is onsite, out of the office. You also get to interact with clients face to face.  Put hands on networking equipment, etc.  Everything above can also be a 'con' if you don't like any of those things.  I've seen a lot of field techs move into technical account management from that role. Desktop support mostly moves into service desk, project techs, etc.  \n\nMaybe you can ask to shadow with a field tech at your company for a day or two before making a decision?  Just some thoughts.", "upvote_ratio": 60.0, "sub": "ITCareerQuestions"}1184{"thread_id": "uorgoq", "question": "Hello everyone, \n\nI have been working for a year as Desktop Support and my manager has recently asked me that he would want me to move to a Field tech position in few months. \nI have a bachelor in CS and the field tech requirement is HS diploma or GED. \n\nDoes this make sense at all?", "comment": "I loved being a field tech. It's a good way to show you can work independently and make decisions on the fly. I was able to parlay that experience into an acquisitions project lead (the person that shows up at a recently purchased office to onboard the new network and other tech) and eventually into an internal it PM position. \n\nAll that being said, if I could support myself and my family doing break fix field work I'd go back in a heartbeat. Easily the best position I've ever had.", "upvote_ratio": 40.0, "sub": "ITCareerQuestions"}1185{"thread_id": "uorgoq", "question": "Hello everyone, \n\nI have been working for a year as Desktop Support and my manager has recently asked me that he would want me to move to a Field tech position in few months. \nI have a bachelor in CS and the field tech requirement is HS diploma or GED. \n\nDoes this make sense at all?", "comment": "I wouldn't do field work unless I got a company vehicle. It sounds like fun to drive around and meet different customers all day. Pretty quickly you realize that even if they pay for your gas, you sink a ton of extra money into car repairs.", "upvote_ratio": 40.0, "sub": "ITCareerQuestions"}1186{"thread_id": "uoril1", "question": "I'm a Computer Information Systems Major graduating this fall, a semester early. A professor recommended me for an internship with a company working with IBM i software. I will be learning a language called RPG, that apparently isn't too well known. \nI wasn't going to take an internship at all, but they are paying well for an internship, and want me full time after I graduate, taking over for a retiring employee. \nBut I'm twenty years old and I don't know if this is what I want to be doing for my entire life. Obviously. \nSo I'm wondering if I'm hindering myself learning all about IBM I and RPG, and if this is actual experience that will aid me should I move on from this job? Should I be concerned about this? \n\nThank you for any advice.", "comment": "You know you don\u2019t have to do the same thing for your entire life right?", "upvote_ratio": 490.0, "sub": "CSCareerQuestions"}1187{"thread_id": "uoril1", "question": "I'm a Computer Information Systems Major graduating this fall, a semester early. A professor recommended me for an internship with a company working with IBM i software. I will be learning a language called RPG, that apparently isn't too well known. \nI wasn't going to take an internship at all, but they are paying well for an internship, and want me full time after I graduate, taking over for a retiring employee. \nBut I'm twenty years old and I don't know if this is what I want to be doing for my entire life. Obviously. \nSo I'm wondering if I'm hindering myself learning all about IBM I and RPG, and if this is actual experience that will aid me should I move on from this job? Should I be concerned about this? \n\nThank you for any advice.", "comment": "An internship is worth taking. Internship > no Internship. Don't worry about being pigeon holed because it's a proprietary language. My internship used Python and now I'm a .NET dev. Trust me, if you don't have a better offer for a different internship you like better, it is worth doing. What a good professor for doing that.", "upvote_ratio": 160.0, "sub": "CSCareerQuestions"}1188{"thread_id": "uoril1", "question": "I'm a Computer Information Systems Major graduating this fall, a semester early. A professor recommended me for an internship with a company working with IBM i software. I will be learning a language called RPG, that apparently isn't too well known. \nI wasn't going to take an internship at all, but they are paying well for an internship, and want me full time after I graduate, taking over for a retiring employee. \nBut I'm twenty years old and I don't know if this is what I want to be doing for my entire life. Obviously. \nSo I'm wondering if I'm hindering myself learning all about IBM I and RPG, and if this is actual experience that will aid me should I move on from this job? Should I be concerned about this? \n\nThank you for any advice.", "comment": "You could also take the internship, figure out if you enjoy the work, and if you don't, there's no obligation to go full time. The internship will be worthwhile, giving you talking points for future interviews!", "upvote_ratio": 80.0, "sub": "CSCareerQuestions"}1189{"thread_id": "uornea", "question": "Hi, why does this script shows ```All our secrets!!! \ud83d\ude28 \ud83d\ude29 \ud83d\ude31``` 2 times ???\nWhat makes me lost why passing False value gave us the same message ??? \n\n```\nclass User:\n    \"\"\"system user\"\"\"\n\n    def __init__(self, trusted=False):\n        self.trusted = trusted\n\n    def can_login(self):\n        \"\"\"only let's trusted friends read secrets\"\"\"\n        return self.trusted\n\n\ndef login(user):\n    \"\"\"Gives access to users with privilages.\"\"\"\n    if user.can_login:\n        print(\"All our secrets!!! \ud83d\ude28 \ud83d\ude29 \ud83d\ude31\")\n    else:\n        print(\"No secrets for you!\")\n\n\nhacker = User(trusted=False)\n\nfriend = User(trusted=True)\n\nlogin(hacker)\nlogin(friend)\n```", "comment": "You haven't called the method \"can\\_login()\". You have checked the truthiness of the class's method, \"can\\_login\". In Python, I think variables that are set evaluate to true, unless they're specifically False. In this case, the class User has a method can\\_login, which evaluates to true when checked in an if statement, because the class is instantiated, so its property \"can\\_login\" evaluates to True.\n\n​\n\nTry:\n\n`if user.can_login():`", "upvote_ratio": 30.0, "sub": "AskProgramming"}1190{"thread_id": "uorpe7", "question": "How is my web developer roadmap? Html5, Css, Bootstrap & Tailwind, Javascript, Vue.js or React, Python, Django web framework, PostgreSQL, Git & Github.\n\nI am currently learning html5 and css5. and then i will try to learn javascript. I use udemy courses to learn and practice every day. I'm going to face-to-face training for python on the weekends. This is my roadmap, what are your suggestions? My goal is to find a job in a good company..Thank you for your advices.", "comment": "Your road map is good. But you may be trying to do too much at once\u2026\u2026\n\nMy suggestion would be to focus on either frontend or back for now, find a job and then learn the other side\u2026\u2026.\n\nI am a self-taught, front end software engineer. I learned with Codecademy.com and cannot attest to udemy for learning to code, but I have used it for other things and it was a great resource\u2026.\n\nCheck out the roadmap I attached, they have roadmap other than frontend. \n\n[frontend roadmap](https://roadmap.sh/frontend)", "upvote_ratio": 30.0, "sub": "ITCareerQuestions"}1191{"thread_id": "uorqf2", "question": "I work at a midsized company and the tech stack is kinda cool, we're breaking stuff down into microservices and using language like Typescript and Python to do that, but the main products are in PHP. \n\nWhen I was first hired as a graduate I had very little experience with it, but I was told I was bein hired to work on mostly python and typescript/node.js stuff because that's what I knew best at the time. Now I don't hate PHP, I like the ease of use of it and I've gotten used to it quirks, but I don't want box myself into only being a PHP dev and after about a year and a half now I would say my percentage time spent on PHP and other languages is about 60/40 respectively.\n\nI have received an offer from a larger company, where I'll be doing Go and Scala in addition to python and typescript so I think it's kind of a no brainer to move on.\n\nI really like my current software engineering team (the QA team are snobs though ngl), we're all really supportive and cool. It's also my first engineering job after graduating so it's got that kinda first ever job vibe to it you know. But in terms of my career I don't think PHP is going to do much good for my resume (I'm in my early twenties btw)\n\nHow would I tell my lead this? Without sounding like a dick and that I was only pretending to like what they are doing and that I was lying when I had my review about how I found the code base. \n\nTldr: I don't want to work on PHP and handing in my notice, how do I not make it sound like I'm a dick.\n\nAlso, how do I hand in a notice? Do I just email it?\n\nEdit: thank you for all the replies, you have all given me alot of great advice and I have a better idea of how to proceed.", "comment": "\"Hey bosmang, I've really enjoyed this role but I want to expand my skills and transition into a different tech stack. I think its for the best I part ways. My last day is X date.\"", "upvote_ratio": 1070.0, "sub": "CSCareerQuestions"}1192{"thread_id": "uorqf2", "question": "I work at a midsized company and the tech stack is kinda cool, we're breaking stuff down into microservices and using language like Typescript and Python to do that, but the main products are in PHP. \n\nWhen I was first hired as a graduate I had very little experience with it, but I was told I was bein hired to work on mostly python and typescript/node.js stuff because that's what I knew best at the time. Now I don't hate PHP, I like the ease of use of it and I've gotten used to it quirks, but I don't want box myself into only being a PHP dev and after about a year and a half now I would say my percentage time spent on PHP and other languages is about 60/40 respectively.\n\nI have received an offer from a larger company, where I'll be doing Go and Scala in addition to python and typescript so I think it's kind of a no brainer to move on.\n\nI really like my current software engineering team (the QA team are snobs though ngl), we're all really supportive and cool. It's also my first engineering job after graduating so it's got that kinda first ever job vibe to it you know. But in terms of my career I don't think PHP is going to do much good for my resume (I'm in my early twenties btw)\n\nHow would I tell my lead this? Without sounding like a dick and that I was only pretending to like what they are doing and that I was lying when I had my review about how I found the code base. \n\nTldr: I don't want to work on PHP and handing in my notice, how do I not make it sound like I'm a dick.\n\nAlso, how do I hand in a notice? Do I just email it?\n\nEdit: thank you for all the replies, you have all given me alot of great advice and I have a better idea of how to proceed.", "comment": "The polite way? \"I have an opportunity to grow and expand my skills\" \n\nThe less polite way \"I don't like our tech stack\"\n\nThough, honestly, I just hand in my notice and say \"I have a new opportunity\".\n\nEmail is a pretty common way to turn in notices these days. Haven't printed a physical notice...well, ever actually. And I've been doing this since fax machines were still a thing.", "upvote_ratio": 500.0, "sub": "CSCareerQuestions"}1193{"thread_id": "uorqf2", "question": "I work at a midsized company and the tech stack is kinda cool, we're breaking stuff down into microservices and using language like Typescript and Python to do that, but the main products are in PHP. \n\nWhen I was first hired as a graduate I had very little experience with it, but I was told I was bein hired to work on mostly python and typescript/node.js stuff because that's what I knew best at the time. Now I don't hate PHP, I like the ease of use of it and I've gotten used to it quirks, but I don't want box myself into only being a PHP dev and after about a year and a half now I would say my percentage time spent on PHP and other languages is about 60/40 respectively.\n\nI have received an offer from a larger company, where I'll be doing Go and Scala in addition to python and typescript so I think it's kind of a no brainer to move on.\n\nI really like my current software engineering team (the QA team are snobs though ngl), we're all really supportive and cool. It's also my first engineering job after graduating so it's got that kinda first ever job vibe to it you know. But in terms of my career I don't think PHP is going to do much good for my resume (I'm in my early twenties btw)\n\nHow would I tell my lead this? Without sounding like a dick and that I was only pretending to like what they are doing and that I was lying when I had my review about how I found the code base. \n\nTldr: I don't want to work on PHP and handing in my notice, how do I not make it sound like I'm a dick.\n\nAlso, how do I hand in a notice? Do I just email it?\n\nEdit: thank you for all the replies, you have all given me alot of great advice and I have a better idea of how to proceed.", "comment": "First, you don't really owe them anything. Just say that you have a new opportunity that is good for your career. You don't have to justify yourself.", "upvote_ratio": 120.0, "sub": "CSCareerQuestions"}1194{"thread_id": "uorw2o", "question": "Given the choice between two courses 1 - in a language you aren't familiar with (also that you don't particularly like) but with a bunch of common industry frameworks. Or 2 - a language you are familiar with (and also like) but with fewer industry frameworks. Which would you choose? \n\nMy gut tells me, go for the language you like and learn the frameworks on your own later. But thats just a gut feeling, I'm curious to know what people from the industry say.", "comment": "This would depend on the job. I'm interviewing soon for a job that centers around one framework (and knowledge of the language is expected). I've also seen many postings that seem more focused on the language because they develop tools internally, so they can't expect new hires to be familiar with them already.\n\nHell, I've applied to jobs that expected 0 knowledge of the language or frameworks they use. They just expected that you'd learn them all on the job (it was a Rust position).", "upvote_ratio": 120.0, "sub": "LearnProgramming"}1195{"thread_id": "uorw2o", "question": "Given the choice between two courses 1 - in a language you aren't familiar with (also that you don't particularly like) but with a bunch of common industry frameworks. Or 2 - a language you are familiar with (and also like) but with fewer industry frameworks. Which would you choose? \n\nMy gut tells me, go for the language you like and learn the frameworks on your own later. But thats just a gut feeling, I'm curious to know what people from the industry say.", "comment": "If your interviewer is selecting for your knowledge of OOP (or literally any other dogma) then ask yourself if you want to be a programmer or a cultist before continuing with the interview.  (Only slightly sarcastic)", "upvote_ratio": 40.0, "sub": "LearnProgramming"}1196{"thread_id": "uorw2o", "question": "Given the choice between two courses 1 - in a language you aren't familiar with (also that you don't particularly like) but with a bunch of common industry frameworks. Or 2 - a language you are familiar with (and also like) but with fewer industry frameworks. Which would you choose? \n\nMy gut tells me, go for the language you like and learn the frameworks on your own later. But thats just a gut feeling, I'm curious to know what people from the industry say.", "comment": "I would probably lean towards the languages you know and can use fully. This allows for a broad range of ability and use of said ability", "upvote_ratio": 30.0, "sub": "LearnProgramming"}1197{"thread_id": "uory2p", "question": "If dentists make their money from bad teeth, why do we use the toothpaste they recommend?", "comment": "Believe it or not, many doctors and dentists are actually ethical or even altruistic, and don\u2019t base their recommendations on personal profit.", "upvote_ratio": 10250.0, "sub": "NoStupidQuestions"}1198{"thread_id": "uory2p", "question": "If dentists make their money from bad teeth, why do we use the toothpaste they recommend?", "comment": "by that logic, why do anything any doctor says if they profit off of us being sick and coming back?", "upvote_ratio": 1980.0, "sub": "NoStupidQuestions"}1199{"thread_id": "uory2p", "question": "If dentists make their money from bad teeth, why do we use the toothpaste they recommend?", "comment": "Healthy teeth make more money for a dentist over the long run. Bad teeth get pulled. People who care about their teeth are willing to spend way more money protecting and maintaining them.", "upvote_ratio": 1080.0, "sub": "NoStupidQuestions"}1200{"thread_id": "uos2rn", "question": "I come from Java, where a List<Cat> is a List<? extends Animal>. \n\nI tried reading articles about c++ variance but I got nowhere.\n\nIf I have a function\n\n    void foo(std::vector<Animal>)\n\nI 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.  \nSo, how can I use foo with a vector<Cat> ? What should I do instead ?\n\n    struct Animal{\n        char* whatever;\n    };\n\n    struct Cat:public Animal{};\n\n    void foo(std::vector<Animal>){}\n\n    int main(int, char **)\n    {\n    std::vector<Cat> v;\n    foo(v); //<- Nope\n    }", "comment": "You dont. If you want to use runtime polymorphism (as you appear to do), then you need to store pointers. A container can only store one type, and if you have a `vector<Animal>` that is a distinct and unrelated type to `vector<Cat>`. No conversion exists, because converting those would require a copy and slice of every element.\n\nHence instead of `Animal` you need to store/take `Animal*` (or a reference, or a smart pointer,...)\n\nIn managed languages like Java this all simply works under the hood, because \"everything is a reference\".\n\n\n---\n\nFurther, note that your `foo` function does copy a vector. You most likely dont want to do that.\n\nAlso **never** use `char*` unless some C API forces you.\n\n---\n\n    #include <vector>\n    #include <memory>\n    #include <string>\n    #include <span>\n\n\n    struct Animal\n    {\n        std::string name;\n        virtual ~Animal() = default;\n    };\n\n    struct Cat : public Animal\n    { };\n\n    void f( const std::span<const std::unique_ptr<Animal>> vec ); //If you dont have access to c++20 span, use `const vector&` instead\n\n    int main()\n    {\n        std::vector<std::unique_ptr<Animal>> v;\n        v.emplace_back( std::make_unique<Cat>() ); // note that now you cant have pretty initializer lists anymore, because std::initializer_list ist stupid.\n        f( v );\n    }", "upvote_ratio": 110.0, "sub": "cpp_questions"}

Showing the first 1,200 of 2168 lines. Download the file for the rest.