Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror

Comment Re:Return to office (Score 1) 105

Fairly obviously, this almost certainly won't result in many thousands of H1-Bs each paying $100k to the US government each year; it'll result in many thousands of jobs that would have been paying US taxes on their wages, and then paying for accommodation, a car, for leisure, and whatever else into the US economy paying their taxes and spending their wages in wherever the new (or expanded overseas) office is instead.

Yep. Google, at least, started this transition during Trump1.

The company has long had engineering sites in various other countries, but until Trump1, the primary focus was always on cities where Google thought the global talent would want to live. Low cost was clearly not the driving factor in the selection of London, Zurich, Munich, Tokyo and Sydney, to name a few of the ones I visited. US sites were similarly not located in low-rent areas. The workforce was definitely global, because Google wanted to hire the smartest people and while the US does have its share of brilliant minds, the US has only 4% of the world's population, so most teams -- even in the US -- ended up being minority American.

During COVID, Trump leveraged the health crisis to essentially halt H-1B approvals and renewals. This caused significant problems for Google. My own team lost a few people because they couldn't get their visas renewed and had to go back home. Some chose to move to other Google sites overseas where Google could get them a work visa, others simply went back to their home countries. One trans woman on my team was in a particularly tough spot because her home country (India) refused to renew her passport because it didn't recognize her new gender. She couldn't get her visa renewed, couldn't go home to India, and also couldn't move to any other country with an expired passport. Luckily, she had a lot of nVidia and Google stock she'd been saving up to buy a house, and by cashing that out had enough free cash to get an EB-5 "investor" visa. It's good to be rich, of course.

Anyway, Google saw what was going on and, anticipating future troubles of the sort, refocused its overseas office plans on building up teams and infrastructure, especially in India which provided so much of Google's engineering talent anyway, with the intention of shifting whole projects and workstreams there. The company had long required a significant percentage of all staffing growth to be in the US (and especially in the bay area), but that policy was scrapped and replaced by its opposite: A certain percentage of all new roles must be based overseas.

It's still the case that the center-of-mass of Google is in the bay area, but the company is actively working to change that, to build up overseas capacity, and not just groups of junior engineers under a manager whose role is to pass them detailed requirements for implementation, but instead full teams with highly-skilled and experienced senior engineers and managers able to take full ownership of major product areas and move them forward.

Trump's latest moves will just accelerate this transition. The result will eventually be a hollowing out of the company's US capacity, and therefore a reduction in the need to hire American engineers. Lucky for me, I'm leaving Google for a startup and anyway am not far from retirement. Between this stuff and AI being poised to replace junior engineering staff it's a good time to be getting out.

Also, I think it will soon be time to start shifting investments out of the US.

Comment Let's do H-2B visas next (Score 0, Troll) 105

H-2B visas allow companies to bring in foreign workers for non-agricultural purposes, such as waiters/waitresses, hotel desk clerks, housekeeping staff, servers, cooks, etc.

Let's impose a $100,000 fee for those visas as well so Americans can get those jobs.

Oh right. These are the visas Trump uses to avoid hiring Amerians at his failing golf clubs and hotels. Just like he knowingly hired illegals at his failing golf club.

Comment Re:Do it yourself (Score 1) 85

Cppcheck apparently knows "hundreds of other rules covering a multitude of language aspects" so you don't "have to mentally apply against every single line of code you write."

Cppcheck doesn't flag anything in Waffle Iron's example.

It also doesn't find anything wrong with:

std::vector<int> vec = {1, 2, 3, 4, 5};
auto it = vec.begin();
vec.push_back(6);
std::cout << *it << std::endl;

Which is another common example of how you can write memory errors without using C++ pointers.

Comment Re:There is already a safe subset of C++ (Score 1) 85

In the sort of places where MISRA and similar coding guides apply, yes, never allocating memory is expected, because once dynamic allocation exists you can't guarantee that you won't die with an out-of-memory error and similarly can't guarantee any time bounds on how long an alloc and dealloc will take.

Sure, so C++ is safe as long as it's used in a way that makes it incredibly painful. Sounds good. Let's just require all C++ code everywhere to be written that way. Rust usage will skyrocket overnight.

Comment Re: Is there anyone here that voted for Trump (Score 1) 263

It is hard to have fair democracy with winners take it all.

For a really rigorous definition of "fair", it's impossible to have fair democracy at all. Arrow's Theorem demonstrates this to a large degree, although many have argued that some of his fairness axioms are excessive. More recent research has concluded that fairness is the wrong standard, because there's no way for an electorate's "will" to really be fairly represented by any electoral system, not in all cases. Some systems can do better most of the time (and "winner take all" is particularly bad), but all systems fail in some cases.

What we need to aim for instead of fairness is "legitimacy", which is more about building broad acceptance of the system than about fixing the system itself, though it's easier to build acceptance for better-designed systems.

Having the country's top politicians continually claiming the system is unfair and rigged is, of course, the worst possible thing to do if you want to build support for the legitimacy of the system.

Comment Re:Jokes on you (Score 2) 263

Precisely none of those books were ever banned.

I decided to check :-)

According to the Book Censorship Database from the Every Library Institute, both "Of Mice and Men" and "Adventures of Huckleberry Finn" have been challenged, but only "Of Mice and Men" was removed, though "restricted" is more accurate. The Birdville Independent School District in Texas removed the book from general access, allowing access only to the AP English class, and the Indian River County Schools in Florida restricted it to high school students.

No Doctor Suess books were banned, although Suess Enterprises voluntarily ceased publication of six books.

Comment Re:Do it yourself (Score 3, Interesting) 85

So don't use STL

Indeed, No True Scotsman would use STL with C++.

clang-tidy and Cppcheck and flaw finder and Sonarqube

The last job I had where I had to use C/C++, we automatically ran an expensive static analysis tool every time we checked in code. I'd estimate that it only found about half of the potential segfaults, and it made up for that by finding twice as many false positives.

Comment Re:Do it yourself (Score 3, Insightful) 85

The "rules" of mutable collections in STL state that collections may not be mutated while being iterated.

Nope. If I had used st::list instead of std::vector, it would have been perfectly fine and officially supported. (Assuming I changed "i+10" to "i+11" in order to make the algorithm actually terminate, although that change wouldn't affect the vector crash.).

The problem is that there are dozens of different rules you have to remember to apply to the different types of lists and iterators. And that's only talking about that one topic. There are hundreds of other rules covering a multitude of language aspects that you have to mentally apply against every single line of code you write, many of which can potentially cause memory corruption.

Comment Re:Do it yourself (Score 4, Interesting) 85

You don't need the language to enforce memory safety to program memory-safe. The most important thing is, for example, to never touch raw pointers. C++ makes it very easy to avoid this. Rust forces you to avoid it, but just because C++ gives you the loaded gun, it doesn't mean you have to use it. In particular not on your own foot.

That is a dangerous misconception. You don't need to use any pointers to get memory errors in C++:

#include <stdio.h>
#include <vector>
 
int main() {
    std::vector<int> v = {1, 2, 3, 4, 5, 6, 7, 8, 9};
    for (auto i : v) {
        if (i % 2 == 0) {
            v.push_back(i + 10);
        }
        printf("%d\n", i);
    }
 
    return 0;
}
 
$ g++ -Wall -pedantic t.cpp
$ echo $?
0
$ ./a.out
 
1
2
-947527061
1600570778
5
6
7
8
9

Comment Re:There is already a safe subset of C++ (Score 4, Insightful) 85

languages like Rust exist to put ignorant programmers in straight jackets for their own good

Are you seriously trying to suggest that never allocating memory is not also a "straight jacket"?

You seem to be saying that a currently existing bowdlerized version C++ is safe for close-world problems. Possibly so, but that still leaves C++ unsuitable for open-world problems. That makes C++ only suitable for niche applications. Why learn it?

If you just use Rust or any other memory safe language, you won't have to worry about what kind of "world" you're writing for, or about choosing from a range of increasingly dangerous "profiles".

Comment Re: As a proud American of Indian origin... (Score 1) 231

We tend to be centrist, and are used to a multiparty system. We also assimilate tend to assimilate well enough to do what (we think) is best for the country practically at the time, rather than be overly biased.

Case in point: I supported Obama back then. Postt Biden, I thought Trmp would be a better choice for the American economy.

Slashdot Top Deals

An optimist believes we live in the best world possible; a pessimist fears this is true.

Working...