Slashdot Mirror


User: TheRaven64

TheRaven64's activity in the archive.

Stories
0
Comments
32,964
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 32,964

  1. Re:I like a lot of the C++ features on Someone on Medium Just Said C++ Was Better Than C (medium.com) · · Score: 1

    That's a very good way of thinking about it. For a simple example, think about locks. In C, you must explicitly release the lock in every code path. You can make this easier by ensuring that you have a single function return, or use structured flow control and make sure that you release the lock in the same scope that you acquire it, and maybe write a static analyser checker to make sure that you did. In C++, you can simply use `std::lock_guard` and it will ensure that the lock is released even in the presence of exceptions at the correct point. If you're happy to use GNU extensions, then __attribute__((cleanup)) will do the same, but it's horribly verbose and so you must wrap it in macros.

  2. Re:Half right on Someone on Medium Just Said C++ Was Better Than C (medium.com) · · Score: 1

    There's no such thing as C++ best practices

    Yes there is. It's called the C++ Core Guidelines and is a proposed part of the upcoming standard. It defines a subset of C++ and an extension library and makes the language more amenable to static checking. Some simple rules of thumb from the standard go a long way: for example, never use new or delete outside of the standard library implementation, always use make_shared or make_unique and always use the returned shared_ptr or unique_ptr instead of a raw pointer. That alone is enough to fix the vast majority of C/C++ memory management bugs.

  3. Re: Indeed on Someone on Medium Just Said C++ Was Better Than C (medium.com) · · Score: 1

    Are you sure it's not defined in C++? I thought that C++11 removed the requirement of sequence points, on the basis that existing compilers did the right thing and programmers didn't understand them.

  4. They were mostly within the sciences, but physics to computer science to maths seems fairly common. Only one went to university to study a humanities subject and ended up in the sciences. This may not be a representative subset though, because a lot of the highest-impact research at the moment is in traditionally interdisciplinary fields and so people with a broader background have an advantage.

  5. What is needed now is some psychological study to figure out why women developed such a gap between their actual maths skills and the perceived maths skills while the men did not.

    There are a few known reasons for this. One relates to early education. Girls tend to develop empathy earlier than boys. If the teacher is confident, then everyone benefits. If the teacher is female and frightened of maths, then the girls pick up on this and internalise it, the boys don't. If the teacher is male and frightened of maths, the girls pick up on it but don't apply it to themselves, the boys are oblivious. Around puberty, there's a whole lot of differences in confidence in relationship to external stimuli.

  6. The thing is that math is pretty much taught one way across schools and if that way does not agree with you, that says nothing about your ability to be good with various STEM fields or even math for that matter.

    I completely agree. I actually was good at maths at school, but the vast majority of what I was taught was completely useless and a lot of what my students were taught at school was actively harmful. Mathematics is a process for solving problems, but most teaching at school involves memorising steps in an algorithm and applying them mechanically. In the UK, we spent two years teaching teenagers to increase the speed at which they can solve a differential equation by about an order of magnitude. At the end of it, they're still three or four orders of magnitude slower than a computer and more error prone and, far worse, they still don't understand why any of the steps that they mechanically apply actually work.

  7. For the ones who are driven to become top level scientists and engineers (and writers!), it is not.

    I disagree. Talking to the other fellows at my college (one of the smaller Cambridge colleges), a very high proportion of them changed topics (some more than once - I think one of our maths fellows has the record at five times) during their degrees. Even if they'd known precisely what they wanted to do at university as a child, the fact that they changed their minds at university indicates that their interests at school didn't reflect their final careers. These are all people in the top percent or two in their respective fields.

  8. Re: Why shop at Walmart on Amazon and Walmart Are In An All-Out Price War That Is Terrifying Big Brands (recode.net) · · Score: 5, Insightful

    Example, I've had the same damn $300 work boots for 5 years!

    Which means that, five years ago, you have $300 of disposable income. Meanwhile, someone else who didn't had to spend $40 every six months on cheap boots that fell apart by the end of that time. At the end of the five years, they've spent $400, you've spent $300 and your boots are still fine, but that doesn't help them if they didn't have $300 to spend on boots at any point. To make things worse, they're now had to spend $100 more of their income than you. This is one of the bit reasons why poverty is difficult to escape.

  9. Re:VMWARE is the future? on Ask Slashdot: What's the Best Working Environment For a Developer? · · Score: 1

    How do you do performance profiling (so that you know which bits to optimise) on a platform where time is unreliable and most of the CPU performance counters are either unavailable or misleading?

  10. The difference now is that many hackers have developed tools for MITM attacks on https.

    Yes and the same tools work with a self-signed cert or with HTTP. To make them work with HTTPS and a signed cert, you need to have a compromised CA signing cert. This is still currently mostly limited to nation-state adversaries.

  11. Step one: Any browser that cares about security MUST stop regarding https with CA certificates as any more trustworthy that self-signed certificates or plain http.

    Why? Plain HTTP can be compromised by anyone on a hop between you and your destination. HTTPS with a self-signed certificate can be compromised by anyone on a hop between you and your destination, but can be detected if you do certificate pinning or certificate transparency. HTTPS with a signed cert can only be compromised with cooperation from a CA. The set of people that can compromise signed HTTPS is significantly lower than the set that can compromise self-signed HTTPS.

  12. I'm not sure if it was ever implemented, but there was a proposal in the UK a few years back to the limit for newly qualified drivers 3 points. This limit would then be increased by one for each year that you didn't collect points, to a maximum of 12.

  13. 2. Collective or other shared accommodation, often combined with studies.

    It's pretty common to move accommodation for each year of a degree, so this can easily be 3-4, more if you do a PhD or similar (though people often find a place for the whole of their PhD). I can remember the second and third places I lived as a student (I stayed in the same place for two years of undergrad and then for the whole of my PhD), but the first was university-owned accommodation and I don't recall the exact address - I certainly don't remember post codes for all of them.

  14. It's been over a decade since the US tightened the visa restrictions so that everyone wanting to come into the country as a practicing journalist must have a visa, even if they're from one of the visa-waiver countries. You can bet that if you tick that box, you're already going to come under a lot of extra scrutiny (and if you don't, but then publish anything written about your time in the USA, expect to be denied entry the next time).

  15. It depends on how you arrange the lights. In the UK, there's a delay in between one set of lights going red and the next going green. In a number of US cities that I've visited, one set turns green at precisely the same instant that the other turns red. This means that going through the lights as they turn red is potentially very dangerous, because you will still be crossing the intersection while cars from other directions go. Adding a small delay, larger than the grace period, would likely improve safety considerably.

    The USA has 7.1 fatalities per billion km driven, whereas the UK has only 3.6. It's tempting to blame the drivers (and the difference in driving tests in the two countries lends some support to this), but the road designers have a lot to blame. The US statistics are likely even worse for in-city driving, because the totals are skewed by the fact that you can drive far further in the US without encountering another vehicle than in the UK.

  16. Re:I'm all over this on Studios Flirt With Offering Movies Early in Home for $30 (variety.com) · · Score: 1

    So you're saying you don't even want to watch the film, you just want to be able to talk about it later (but only in the next few days)? The problem with that idea is that it only works if you surround yourself with other keep-up-with-the-Joneses types who insist on watching the latest blockbuster as soon as it comes out and have limited other conversational topics.

  17. Re:I'm all over this on Studios Flirt With Offering Movies Early in Home for $30 (variety.com) · · Score: 1

    I don't get it. Given the choice between paying $30 now, or $1-3 in a few months once it's out on rental / streaming services, you'd pick the former? I can't think of a single film in the last decade that I've wanted to see so much that I'd pay an order of magnitude more to see it now. Plus there's a reasonable sized backlog of things that I want to watch, so even if I watch them in release order they're all available to rent cheaply by the time I get around to them.

  18. Re:Open Source is Evil on Studios Flirt With Offering Movies Early in Home for $30 (variety.com) · · Score: 1

    We are trying to do to movies what we did to software with open source. Reduce its value so much that the people working in the industry struggle to survive

    Huh? That's not what open source did at all. It shifted the value from copying software to creating software. People are still paid to write open source software, it's just that now most of them are paid by companies who want the features added (or the bugs fixed) directly, rather than by some middlemen that want to charge per copy.

  19. Re: Why Not On Release Day And For A Regular Price on Studios Flirt With Offering Movies Early in Home for $30 (variety.com) · · Score: 1

    Eventually the movie industry will learn that the damage that it's doing to itself trying to prevent piracy is significantly greater than the damage that piracy is doing to it. It took Apple taking control over a very lucrative slice of the distribution market before the music industry learned that DRM does little to prevent piracy, but does a lot to create distribution monopolies outside of their control. I wonder how long it will be for someone like Amazon or Netflix to grab a sufficiently large slice of the distribution market that they realise that allowing DRM-free downloads from multiple other sources is the only way to regain their bargaining power.

  20. Re:sell movie theatre stock now on Studios Flirt With Offering Movies Early in Home for $30 (variety.com) · · Score: 1

    Except it's not competing with going to the cinema, it's competing with watching the same film a couple of months at home later for a tenth of that price. The problem for the movie industry is that they're entirely focussed around first-week profits (to the extent that they set up contracts with cinemas such that they get almost all of the takings from the first week and close to none after a couple of weeks). This means that they have to spend a huge amount of money on advertising to try to get everyone to watch the film at the same time and don't get to take advantage of slower word-of-mouth (or online) recommendations. The advent of decent-quality home cinema systems means that a lot more people are watching films a few months after they came out in the cinemas, which causes problems for the studios' business model.

  21. Re:Hahahahaha on Studios Flirt With Offering Movies Early in Home for $30 (variety.com) · · Score: -1, Flamebait

    If instant gratification is worth that much to you, then you're probably already handing over your money to Hollywood at a rapid rate.

  22. Exactly. It's interesting research, but it hits diminishing returns very quickly. Cheap solar panels have gone from 8% to 16% efficiency in a few years. That's a huge win, because you get double the power output for the same investment. Getting up to 32% for the same cost will be a similar win, but that's a long way away.

  23. Re:Municipal/County Fiber on 'Dig Once' Bill Could Bring Fiber Internet To Much of the US (arstechnica.com) · · Score: 1

    That would be a major change to contract law

    Antitrust / monopoly regulations trump contracts in a number of cases already.

  24. Re: please use a password manager.... on LastPass Bugs Allow Malicious Websites To Steal Passwords (bleepingcomputer.com) · · Score: 1

    Doesn't even require Safari - there's a password assistant built into the OS, even though it's not exposed as an application.

    For those wanting more than a vague hint: it's in the Keychain Access app. The New Password Item menu item brings up a dialog box that lets you generate a password matching various criteria.

  25. Re: Liability on Why American Farmers Are Hacking Their Tractors With Ukrainian Firmware (vice.com) · · Score: 5, Insightful

    No, libertarians are the ones that believe that oppression is too important to be left to the government and should be handled more efficiently by the private sector.