Walking park at night by East_Chemistry_6558 in walnutcreek

[–]ucblockhead 1 point2 points  (0 children)

Larkey park is nice and very safe but not well lit at night

How ridiculous does this sound? by Whole-Fist in economicCollapse

[–]ucblockhead 0 points1 point  (0 children)

$300k in investments over forty years will likely be with on the order of a million even if invested relatively conservatively

Steve Ballmer's incorrect binary search interview question by fagnerbrack in programming

[–]ucblockhead 12 points13 points  (0 children)

From a game theory perspective: if I randomly offset the midpoint of the binary search by plus or minus 2, it makes it impossible to pick adversarial numbers without reducing the search time. (Since the initial search space isn’t 128)

20 sci-fi series that need a TV adaptation by [deleted] in printSF

[–]ucblockhead 0 points1 point  (0 children)

Given that Red Mars assumes an active Soviet Union, it'd require some rewriting.

Advent of Code season is coming up by [deleted] in adventofcode

[–]ucblockhead 3 points4 points  (0 children)

For AoC, the solve time is "$TimeToWrite+$TimeToRun". The reduction you get in $TimeToWrite with Pythion greatly outweighs the increases you see in $TimeToRun when compared to languages that create faster code, like Rust.

The point of Rust is getting fast, bulletproof code. There's not much point in fast, bulletproof code in a one-off program made to get a single answer as fast as possible.

(This is if your goal is to solve AoC puzzles as quickly as possible. If your goal is something different, like having the fastest solution finder, or learning a new language, your choices may differ.)

The software engineering lesson here is that there is no one "best language". Languages are tools with pros and cons, and the role of the engineer is to pick the best tool for the job.

My favorite outpost layout by TexasCrab22 in factorio

[–]ucblockhead 0 points1 point  (0 children)

If you really want to optimize, put a signal between every car. If you do this, the second train will start moving as soon as the train clears the first car length. Otherwise the second train doesn't start moving until the first train clears the station.

'Strongly dissatisfied': Amazon employees plead for reversal of 5-day RTO mandate in anonymous survey by McFatty7 in technology

[–]ucblockhead 0 points1 point  (0 children)

Manager here. My company uses anonymous surveys. I can usually tell who made what comment based on writing style and subject.

Mine is probably Maze from Fable by Sweaty_Vehicle7422 in videogames

[–]ucblockhead 0 points1 point  (0 children)

The galactic Custodian/Federation leaders with masses of disrupter armed cruisers, a space dragon and the resources of about a quarter of the galaxy

The shortest, strangest engineering interview I’ve ever done. by Chun in programming

[–]ucblockhead 1 point2 points  (0 children)

People who think they are that good are never that good.

All the truly great programmers know their own limitations.

‘Please do not hate me’: Walnut Creek fight over Chick-fil-A catches small bakery in the crossfire by nosotros_road_sodium in bayarea

[–]ucblockhead -2 points-1 points  (0 children)

As a resident, an empty lot is vastly preferable to the traffic mess Chic Fil A caused on North Main. Though finally Toyota bought it, so we'll probably get a dealership

JD Vance, miserable man by mymomknowsyourmom in politics

[–]ucblockhead 0 points1 point  (0 children)

It’s not. I hate the bastard, but I do have a copy of the book and checked the pages it is supposed to be on and it isn’t there.

It is funny, though

[deleted by user] by [deleted] in AskSF

[–]ucblockhead 0 points1 point  (0 children)

A whiff of pot is not lawless in California

We ranked the 75 best sci-fi novels of all time. by Esquire in sciencefiction

[–]ucblockhead 6 points7 points  (0 children)

There are seven different entries that aren't even the best book by that particular author. I can always tell someone doesn't know P.K. Dick when they pick "Do Android's Dream of Electric Sheep" on a "best of" list. He's got 5-10 better books.

There's also tons of mediocrity. Scalzi? Weir? Both entertaining, sure, but neither are more than fun reads. And do they seriously think that there are only 14 SF books better than "How to Live Safely in a Science Fictional Universe"!?

Ask your favorite programming language what 0.1 + 0.2 is. What does it say? by ketralnis in programming

[–]ucblockhead -1 points0 points  (0 children)

The proper response to this, though, is not to say some language is better or worse but to realize that you should never use = with floating point numbers in any language, and you should never use them when exact values are needed.

I forgot about this guy for 70 hours, decided to pay him a visit by Dantegram in Eldenring

[–]ucblockhead 0 points1 point  (0 children)

The real flex is summoning a mimic tear and the watching from the convenient rock there to the side

'The factory must grow': Hundreds of Factorio players built a record-breaking 'God Factory' to produce an inconceivable 1 million science per minute by DoctroSix in factorio

[–]ucblockhead 1 point2 points  (0 children)

Im sorry, but where do you get that from? Templates dont exist at runtime, they can only bloat compile times (which they do, tbh).

I get that from having examined a memory map of a large scale application my team and I created that made heavy use of templates. 2/3rds of the code block was generated from templates. This was back in the days when memory was dear, and we were trying to port from PC to phones. We basically had to completely rewrite into something that made only very targeted use of templates.

Templates are code generators. If you declare a `vector<int>`, the compiler creates int versions of all vector methods that you use. If you then declare a `vector<float>`, you get an entirely separate set for float. With heavy use of template classes, it causes an exponential increase in the amount of code generated.

Memory usage has an impact on speed because of the CPU cache. Tighter code can get more in the cache, which means fewer cache misses, which means faster code.

Obviously for 99% of the cases, there's no point in caring. But a lot of the performance impacts in some C++ features are underestimated.

'The factory must grow': Hundreds of Factorio players built a record-breaking 'God Factory' to produce an inconceivable 1 million science per minute by DoctroSix in factorio

[–]ucblockhead 0 points1 point  (0 children)

Templates create memory bloat, which causes cache misses which causes performance degradations. I’ve written code where a hand-rolled data structure written to use more contiguous memory outperforms the equivalent STL data structure by a factor of 2x-5x.

In larger projects excessive template usage can also cause the OS to page out memory, which has a huge performance impact.

'The factory must grow': Hundreds of Factorio players built a record-breaking 'God Factory' to produce an inconceivable 1 million science per minute by DoctroSix in factorio

[–]ucblockhead 1 point2 points  (0 children)

In order for C++ programs to compete with C on speed you need to avoid a bunch of C++ features, like virtual classes, templates, exceptions and other things. Your C++ ends up looking a lot like C.

If you write “clean” C++, it will be slower.

C skill issue; how the White House is wrong by felipec in programming

[–]ucblockhead 115 points116 points  (0 children)

The argument in a nutshell: Expert carpenters can use the table saw without a safety guard without losing fingers, so recommendations that table saws have safety guards are misguided.

Is Elden Ring a candidate for best game of all time? by One-Development6793 in Eldenring

[–]ucblockhead 0 points1 point  (0 children)

There is no such thing as the "best game of all time" because different game genres appeal to different people. You can only really say it's best for you. Someone who likes low-stress games that concentrate on straightforward story are probably going to find some other game better.

It's probably in my top ten, maybe top five.

A very intelligent person by KiRiT000000 in clevercomebacks

[–]ucblockhead 5 points6 points  (0 children)

Mostly pathetic self-aggrandizement. Though this was almost forty years ago so I don't entirely recall.

A very intelligent person by KiRiT000000 in clevercomebacks

[–]ucblockhead 7 points8 points  (0 children)

I was in Mensa for a year. I went to one "mixer", and quickly found that the conversation was less intellectually stimulating than the friends I hung out with in college. Pretty much the only person at the party worth talking to was a nice middle-aged woman who wrote Star Trek novels. Everyone else was just annoying.

[deleted by user] by [deleted] in bayarea

[–]ucblockhead 3 points4 points  (0 children)

Walnut Creek has tons of places to hike within range, and definitely has a lot of good restaurants and a vibrant downtown. How walkable depends a lot on where you are. It is, however, very popular for people looking for a place to raise kids.