8,634 karma · joined Jun 23, 2011 (15y ago) · 7,679 submissions
comment 8y ago · link · parent
Or is the correct fix to use errgroup[1]?
func doSomethingTwice() error {
var g errgroup.Group
g.Go(func() error {
defer fmt.Println("done wth a")
return doSomething("a")
})
g.Go(func() error {
defer fmt.Println("done with b")
return doSomething("b")
})
return g.Wait()
}
[1] https://godoc.org/golang.org/x/sync/errgroupcomment 8y ago · link · parent
But as a farmer, I have to walk up and fix equipment all the time.
There are people who are better at it then me. I will definitely hire them when I am under a time crunch, but they also charge way more money than the figures I quoted earlier, so you cannot afford to take them on full-time (if they are willing to work on a farm full-time) and have them to perform other duties on the farm that do not have the same value proposition.
> would you expect an average mechanic to be able to develop software as well?
Yes, absolutely. I distinctly remember when I started developing software as a teenager and was able to start writing software after a day or two of honing my thought process, without the benefit of having a professional background like a mechanic has. It is a very accessible activity. I don't know if they could walk into a SV tech company offering $200k/year, just as a farmhand who works on machinery isn't likely to walk into higher paying heavy equipment mechanic position. There are going to be better developers out there, but like mechanical work, there is a gradient.
comment 8y ago · link · parent
Makes sense though. The only reason businesses ever started putting "bachelor degree required" on job ads is to help protect themselves in case of a hiring discrimination lawsuit. I provides a defence of "We didn't hire <person of minority> because they did not have the required degree." Courts have shown a willingness to accept this defence.
It is not there as information for job seekers, but to keep the lawyers happy.
comment 8y ago · link · parent
Until it doesn't.
type thing struct {
foo *int
}
func f(x thing) {
*x.foo = 42
}
func main() {
v := 1234
var x thing
x.foo = &v
fmt.Printf("x.foo before: %v\n", *x.foo)
f(x)
fmt.Printf("x.foo after: %v\n", *x.foo)
}
Or maybe that is what you'd expect, but then slices shouldn't seem so mysterious.comment 8y ago · link · parent
While not Iowa, the farms around here will easily pay you $20-30/hr. if you are willing to work on equipment. Which, anyone who is capable of software development, also has the mindset required to work on equipment. They're pretty similar activities when you get down to it. I'm not sure there is any reason why someone with such a skillset needs to go into picking apricots. We're not exactly talking about a 12 year old who has never worked before and who's greatest ability is being able to turn on his video game console.
comment 8y ago · link · parent
The second time, later in my career, I did find myself without work, but with the substantial savings I was able to accumulate thanks to a low cost of living, I didn't even bother to look for another job. I essentially took a couple of months of vacation during the worst of it and then employers started knocking on my door again when things started to turn around.
I am sure another downturn will come again, and if that means having to move, so be it. I also have no qualms about working in other industries. I'm especially fond of the agriculture industry, which is convenient for me. But, as you well know, having a tech career for long enough to have gone through those two downturns, we're getting into the position that we could start to seriously think about retiring when that time comes. While the average career may not have that luxury, you can save a lot of money with a high tech income.
The risk seems overblown to me. If the worst case scenario is having to move back to where you came, that's not a very big risk. You will be there even if you stay put.
comment 8y ago · link · parent
In my foolish youth I once tried to maintain two development jobs at the same time. That turned out to be a really big mistake. With that in hindsight, I really have to question why people are worried about how much opportunity there is. Maybe you are better than me and can handle two jobs without issue, but three? How many jobs do you really need? One available opportunity is all I will ever need again.
comment 8y ago · link · parent
I'm not sure that living has a market, but okay, sure. If living is something you can buy, it is quite possible that not everyone will have the desire and willingness to be a buyer.
> Would submarines never be short of oxygen if we raised oxygen price ?
If you are trying to use short in an economic context to stay consistent with shortage (which, admittedly, makes the phrasing awkward), and not using definitions of short that have no relation to shortage (which would make the question pretty strange in the context of this discussion), then I am not sure why you would want to sell your existing oxygen only to buy it back after the price has gone up? But I guess you can short your oxygen if you wish. Why not?
comment 8y ago · link · parent
Agricultural work can be available in rural areas, but even in the most agriculturally productive areas, makes up a small portion of the workforce. The age where the majority of the population are farmers is long gone. Even within the agricultural sector, a lot of the work is in front of a desk.
comment 8y ago · link · parent
I'm not as familiar with how to navigate the BLS to see what things are like stateside at a localized level, but you might want to look more closely. You may be surprised. I was.
comment 8y ago · link · parent
Is the problem lack of education, or is it that humans also have emotions to contend with?
If, hypothetically, someone with a $100k income spends $75k on rent, they are left with $25k to spend elsewhere. If another location allows you to rent a place for $10k, that means that a $35k income would also leave you with $25k to spend elsewhere.
Assuming all else is equal, try and convince someone with that $100k income that they should move and take a $40k job instead. It, in almost all cases, isn't going to happen.
Sure, they would technically be better off, giving them an additional $5,000 in their pocket. But from a social perspective, saying that you make $100k sounds way more impressive than saying you make $40k. And moving isn't a desirable action for most. It seems that is difficult for a lot of people to overcome, even when they know the numbers are not in their favour.
comment 8y ago · link · parent
But our grandparents did predominately live in rural areas. You can still live quite affordably in rural areas now. Most people just aren't happy with that lifestyle anymore.
Additionally, the majority of our grandparents didn't own their homes. If the majority of us were okay with renting like our grandparents were, you wouldn't see the irrational behaviour of buying at any cost that pushes the market beyond what is sensible (i.e. paying 75% of salary for no reason).
comment 8y ago · link · parent
I was expecting a completely different result.
comment 8y ago · link · parent
Makes sense to me. Famine suggests that someone goes hungry, so obviously not everyone is in the market. So it is either down those who can afford food get what food is available, and thus everyone else is not in the market to buy food. Or you resort to capping the price of food and rely on something like a lottery system, or first come, first serve to determine who ultimately gets the food. Only the latter would be described as a shortage of food.
comment 8y ago · link · parent
Quite literally all shortages are solved by rising price. After all, the formal definition of a shortage is "a situation where an external mechanism, such as government intervention, prevents price from rising". If the price can rise, then a shortage cannot be. Which is the case here. If you have the budget for $1m/year compensation, it's yours to offer.
Think about it this way: If there was only one person in the world capable of being a data scientist, each company in need of a data scientist would increase their offers to try and attract this person to their company. But no company in existence has an unlimited budget. Eventually all companies will be priced out of the market except for the company who ultimately employs this person. Since the other companies stop looking for data scientists beyond a certain price, the one position that remains in the market is perfectly filled with the one person available to do such work.
To put it another way: No matter how much you want one, there isn't a shortage of Ferraris because you cannot afford one. You simply aren't in the market for one in the first place. Everyone who is in the market for a Ferrari can have one. Likewise, everyone who is in the market for a data scientist can have one.
The mid-level exec with a data science poster on his wall, but a small budget for such work, is no more in the market for a data scientist than a teenager with a Ferrari poster on his wall is in the market for a Ferrari. That's just hopes and dreams. They don't count as anything more.
comment 8y ago · link · parent
Not that Go ever planned to not have generics. It was always simply a question of how to implement them in a non-ridiculous way. They were warned early on by members of the Java team to tread carefully and not make the same mistakes they did.
The team has crafted many generics proposals over the years, but they all fell short one way or another.
comment 8y ago · link · parent
Not even in the 40s and 50s could you live anywhere you wanted, while owning a house on a sole income. Like today, the houses affordable to one income were only found in certain places and only those who were willing to move (or were lucky enough to have been born) where housing was affordable were able to own them.
From what I recall, the homeownership rate in the 1940s was only around 45%. Owning your home wasn't anywhere near as common as it is today. To say that people with one income could afford their home back then is simply cherry-picking those who could, ignoring everyone else.
comment 8y ago · link · parent
https://nationalpost.com/news/canada/the-walk-that-changed-t...
comment 8y ago · link · parent
The top tier cities also have higher mean incomes. The top tier cities tend to attract the outliers. If you are Mark Zuckerberg, you probably live in a top tier city. But almost nobody is able to say they are earning like Mark Zuckerberg. And if you are earning like Mark Zuckerberg, the cost of housing is the least of your concerns.
It seems for the normal every day average person, they actually make less money in a top tier city.
comment 8y ago · link · parent
comment 8y ago · link · parent
It is entirely understandable that expectations have changed. I certainly don't think twice about hopping in my car any day of the week, and own two of them at that. But if expectations have changed, why would we want to even try to to apply 40s and 50s housing logic to modern times?
comment 8y ago · link · parent
[1] https://en.wikipedia.org/wiki/Disposable_and_discretionary_i...
comment 8y ago · link · parent
It is not like in the 40s and 50s you could live anywhere you wanted either. In fact, the 40s and 50s is right in the heart of the urbanization movement that happened precisely because capital concentrated, exactly like what is happening in many major cities today, and regular people could no longer afford to live where they grew up and had friends and family, and were left with little choice but to leave their existing life and head for the city to start a new one.
It wasn't particularly pleasant. Most people don't crave that kind of adventure. Most people would rather stay near to friends and family and the life they know, but sometimes you don't get that option. That remains true today.