FrankDrakman
FrankDrakman t1_j2f2u61 wrote
Reply to ELI5. What does "return" do in programming? I read about it a lot and still dont understand the purpose. by BlendsLoL
Imagine you had a smart little robot, Eff, who did nothing but tell you how long it would take to get to a destination in your helicopter, given the two starting points, but it took him an hour to figure it out. So you say "Eff, how long will it take me to fly from Albany to Albuquerque?", and Eff goes away, and returns an hour later with "7.4 hours, boss!". IOW, Eff(Albany, Albuquerque) returns 7.4.
In programming, f(x) can be any function you want it to be. In this case, it returned a number of hours, but it could return a name e.g. TOPSALES(Jan) could return 'Joe Smith' as the best salesman. The term 'return' comes because you give the function the input data, and it 'goes away', figures out the answer, and then 'returns' with the answer. Meanwhile, your main program is waiting, and can't move on until the function returns its answer. Thus, at that point, the function both returns with an answer, and hands control back to the main program.
Currently, this isn't a big deal, as most functions execute almost instantly but in the old days, you could wait five, ten, or more minutes waiting for a function call to 'return'.
FrankDrakman t1_j2e6l7y wrote
Reply to comment by Generallybadadvice in ELI5: Why do companies require annual budget be spent 100%? by angrybird7677
Incentive pay systems are a bitch to design, because people are so good at gaming them. One call centre I worked at had contests on Friday if weekly sales had been down. One woman, no matter how bad she was doing by lunch, always pulled out a bunch of sales in the afternoon, and was given the $50 cash prize.
I was the data analyst, and got suspicious. Sure enough, all most of those 'sales' would be cancelled on Tuesday or Wednesday of the next week. We listened to the tapes of her sales calls, and heard "I'll put the order in to reserve your spot; if you change your mind over the weekend, you can cancel." She didn't deny any of this when confronted with the evidence; she also didn't come back to work the next day, or ever after.
Also, the top performers on each team seemed to win week after week, which makes sense. They are the best sales people, so they generally sell more at all times. But an incentive that goes to the top performers most of the time only reinforces an "us vs them" mentality on the sales team, where the top performers are seen as getting the best leads (they do), and getting the most slack for things like being late, etc. (they did). As I said, designing a good, fair, working incentive system that can't be 'gamed' is not easy.
FrankDrakman t1_j2e50k0 wrote
Reply to comment by hsvsunshyn in ELI5: Why do companies require annual budget be spent 100%? by angrybird7677
> Giant companies are giant. It is difficult to give each group/department/division its own rules, so they prefer one-size-fits-all approaches, even if they are more inefficient individually.
The myth of Procrustes was he welcomed all travellers to spend a night in his bed for free; however, if you were too short, you were stretched to fit it the bed, and if too tall, some of you got lopped off. We use the same Procrustean 'one-size-fits-all' approach in many places in the modern world, from grade school, to government policies, to goddam 'one-size' socks that are either too short or too loose. I suggest it's an artifact of the mechanical age, which we are in the process of leaving behind.
The assembly line that so tremendously increased material production was based on identical parts, assembled in an identical manner, to create identical products. Our new computer-controlled systems have the potential to create unique parts, uniquely assembled, to deliver a unique product to you. (No, we're not there yet) We may be leaving the Procrustean model behind.
I worked as a data analyst. I remember 'strategic planning' in 1980 - using 6 to 12 month old data to predict where you were going to be in five years, and what you should be doing to get there. Now we have real time data available, and the computing power to process it instantly. Presumably, the greater flexibility of this process will filter down to the budgeting system, but that will probably take the retirement of the Boomer generation, who are still stuck in the Procrustean paradigm.
FrankDrakman t1_j243vcz wrote
Reply to ELI5 why do electric vehicles have one big battery that's hard to replace once it's expired, rather than lots of smaller ones that could be swapped out based on need (to trade off range/power/weight)? by ginonofalg
there are many good answers in this thread ,but I haven't seen this point:
More batteries = more connections
My first rule of troubleshooting is "90% of the problems are in the connections". You'd be surprised how many 'dead' TVs and PCs come back to life when the power plug is taken out and re-inserted. Each connection is another point of failure in the system. If you had ten batteries, you'd have ten times the chance of a failure.
And presumably, you'd have the consumer opening the hatch and changing the battery. I can tell you, the engineers in most tech companies would hear "consumer changing the parts" and have a heart attack. It's a recipe for a host of problems.
FrankDrakman t1_j1ua9qd wrote
Reply to Killing Joke (1980) by So_Do_You_Like_Stuff
Love Like Blood
One of the best songs of the 80s
FrankDrakman t1_j1u6ot4 wrote
Reply to comment by lol_camis in LPT: If driving in a snowstorm and your GPS suggests taking a faster route, don’t do it if it takes you off the Highway. Backroads are usually last to be cleared of snow and you could get stuck! by Bradiator34
And there's only one road connecting the eastern side with the western side. We were there a few years ago, and a huge mudslide took out half of Highway 4. People were told they had to stay in Tofino for two days because there was no other way out.
FrankDrakman t1_j1u6a41 wrote
Reply to comment by Sometimes_Stutters in LPT: If driving in a snowstorm and your GPS suggests taking a faster route, don’t do it if it takes you off the Highway. Backroads are usually last to be cleared of snow and you could get stuck! by Bradiator34
> Pretend you’re driving a boat.
As a Canadian, I concur. On a boat, you have to plan ahead; same thing driving in the snow.
Although, with the new traction control and ABS, you can't have any fun any more. One of the rites of passage for young men in Canada was taking the car to the empty shopping mall parking lot after a snowfall, and learning how to do doughnuts.
FrankDrakman t1_j1u63b9 wrote
Reply to comment by SirThatsCuba in LPT: If driving in a snowstorm and your GPS suggests taking a faster route, don’t do it if it takes you off the Highway. Backroads are usually last to be cleared of snow and you could get stuck! by Bradiator34
Or having a heart attack. The number of men that die each year shovelling fire.. I don't wanna think about it.
FrankDrakman t1_j1u60u8 wrote
Reply to comment by granpooba19 in LPT: If driving in a snowstorm and your GPS suggests taking a faster route, don’t do it if it takes you off the Highway. Backroads are usually last to be cleared of snow and you could get stuck! by Bradiator34
Which ferry? Driving south of the lake from Plattsburg can take three hours.
FrankDrakman t1_j1u5w42 wrote
Reply to LPT: If driving in a snowstorm and your GPS suggests taking a faster route, don’t do it if it takes you off the Highway. Backroads are usually last to be cleared of snow and you could get stuck! by Bradiator34
"Shortest Route" is the worst possible option. It had me zig-zagging on a two-lane road for 30 miles, when there was an interstate three miles away.
FrankDrakman t1_j1nhmk8 wrote
Reply to Universal studios 1992 by Capital_Trash8966
I was there in '92 at Christmas. What a mistake. Everything was packed to the gills. Luckily (?) my M-I-L was in a wheelchair so we waited - all 11 of us - in the Handicapped line instead of the regular line. At the Terminator ride, that meant we waited only an hour instead of three and a half.
FrankDrakman t1_j1926vv wrote
Reply to Can you find Hagrid-to-be, Robbie Coltrane in this pic of the Glenalmond College Rugby Team of 1966. by Dhorlin
Coltrane was so good in the series Cracker. Brilliant, undisciplined, driven by appetites; maddening and exciting all at once. Hours of screen time portraying a complex, human protagonist.
And he's remembered for a few minutes of on-screen time as a half-human caretaker.
FrankDrakman t1_j18rbtq wrote
Reply to TIL Stan Lee made the X-Men mutants because he didn't want to come up with a reason for their super powers, instead they were just born with them. Additionally the 1963 comic was initially a flop until the 1975 reboot by Len Wein and Dave Cockrum. by jamescookenotthatone
I think Stan got tired of "radioactivity" as the reason for everyone's super powers.
BTW, I had all the first 14 issues, and it was my favourite comic until my mom threw them all out when I was away at scout camp.
FrankDrakman t1_j0hhxj8 wrote
Reply to Jacinda Ardern auctions off ‘arrogant prick’ comment to raise money for prostate cancer charity by Laogama
She gets to make a joke about it, and gets a pass. If someone had called her the equivalent, say a "stupid c*nt", he would be immediately cancelled.
FrankDrakman t1_j00i5l7 wrote
Reply to comment by skodaddy426 in [OC] Geospatial density of the biggest fast food chains in the USA by MaverickJW
All across the northwest, really. Looks like the donut drought starts at the Dakotas.
FrankDrakman t1_izsrlcu wrote
Reply to comment by Not_Legal_Advice_Pod in Football betting experiment: what if I consistently bet against the odds, on the least likely match outcome? This is the English Premier League. What happened in 2019/20? (sorry for the third similar post, I test different competitions incrementally after the jaw-dropping World Cups' results) [OC] by ikashnitsky
Wasn't that Leicester's year? No one was picking them for anything, so every game would have been an upset, at least at the beginning.
FrankDrakman t1_izcwpl6 wrote
Games are metaphors for life, just as any other art form is. Just as a caricature is memorable because it emphasizes some features and minimizes others, games are memorable because they bring some elements of life into greater contrast and visibility.
The most obvious contrast is the game ends, while we hope our lives don't. By shortening the time frame, and compressing the 'life' into a few hours, each moment becomes more important. We celebrate the wins like a resurrection, and the losses like death. But that is obvious, and simplistic, and trite.
Consider time, and how it's marked and measured in different games. In soccer, the clock runs and the referee adds on extra time as he sees fit. In hockey and basketball, the clock stops on every stoppage of play. In football, sometimes the clock stops with the play, and sometimes it doesn't. In baseball, there isn't a clock at all,^1 nor is there one in cricket. Time is the only true non-renewable resource, so it's fascinating that our games treat it so differently.
Our games are also reflections of our societies. We saw the long struggle for integration in pro sports in the US, one whose victory preceded the one in wider society. We have seen big data overturn analytics in a number of sports, particularly baseball, as it is overturning many established patterns in life. And we have seen the corruption that we see in government copied in FIFA, in figure skating, and the IOC at the organizational level, and by the Houston Astros, the Aussie cricket team, and a bunch of PED-o baseball players at the club level. Our games are microcosms of our world, with diverse elements laid out in stark relief. We can learn a lot from studying our games, just as we learn by studying literature or poetry.
^1 - Well, it didn't. I believe a pitch clock was introduced in the minors last year, and it will make its way to the majors next year.
FrankDrakman t1_iwjudkp wrote
Reply to comment by brighter_hell in TIL Of the Bre-X fraud. The Canadian mining company was a penny stock that reportedly found billions of dollars of gold in Indonesia. The stock skyrocketed but collapsed following the suicide of one of the geologists and discovery that the core samples were salted. by jamescookenotthatone
This entire thread has metamorphed into this slate of puns.
FrankDrakman t1_iwju526 wrote
Reply to comment by 07hogada in TIL Of the Bre-X fraud. The Canadian mining company was a penny stock that reportedly found billions of dollars of gold in Indonesia. The stock skyrocketed but collapsed following the suicide of one of the geologists and discovery that the core samples were salted. by jamescookenotthatone
Or Gary Webb, who was about to testify about the US gov't running drugs through Arkansas while Bill C. was governor, who suicided himself with two bullets to the back of the head.
FrankDrakman t1_iwjtm1a wrote
Reply to TIL Of the Bre-X fraud. The Canadian mining company was a penny stock that reportedly found billions of dollars of gold in Indonesia. The stock skyrocketed but collapsed following the suicide of one of the geologists and discovery that the core samples were salted. by jamescookenotthatone
Oh ya. I remember that. My ex decided she was going to be an investor (I have an MBA with honours and a Canadian Securities Course with honours and I actually managed the portfolio for the extended family). She took $35,000 and put it all into Bre-X.
She did that the day before the news broke that the samples had been salted. When trading was resumed, the shares were worthless. $35k in less than 48 hours. "...and it's gone!" in real life.
FrankDrakman t1_ivmc8nh wrote
Reply to comment by iiioiia in The big data delusion – the more data we have, the harder it is to find meaningful patterns in the world. by IAI_Admin
I've never heard of Hacker News.
FrankDrakman t1_ivjjg3h wrote
Reply to comment by visarga in The big data delusion – the more data we have, the harder it is to find meaningful patterns in the world. by IAI_Admin
Yes, I agree the recent breakthroughs are staggering, and NLP is moving along rapidly. But my point still stands: this guy's firm had it working well in 2012, and it was being secretly used by the US government.
FrankDrakman t1_ivfsebo wrote
Reply to comment by JustAPerspective in The big data delusion – the more data we have, the harder it is to find meaningful patterns in the world. by IAI_Admin
Oh, you mean like Covid?
FrankDrakman t1_ivfi5hq wrote
Reply to comment by AllanfromWales1 in The big data delusion – the more data we have, the harder it is to find meaningful patterns in the world. by IAI_Admin
Not at all. As an engineer, I understand we're building models, based on our incomplete understanding. As we learn more, we refine our models, but they are always only models, and as such, necessarily simpler than the real world, because they are based on principles abstracted from the real world, and not the real world itself.
There's no 'pretending' involved. We know they are models, we know they are only approximations, and we also know the approximations are good enough to get the results we want. And with that, we built the society you see around us.
Why do you sneer at the process that has resulted in immense wealth and better lives for billions of people?
FrankDrakman t1_j31kc8i wrote
Reply to comment by [deleted] in Canada defeats rival U.S., advances to world junior gold-medal game against Czech Republic by Genevieves_bitch
Istanbul was Constantinople
Now it's Istanbul, not Constantinople ...
Why did Constantinople get the works?
It's nobody's business but the Turks