don't you get the same benefit if you version controlled the db file with git? with git, each commit saves a diff from the previous one as a blob. the difference is that in git, in addition to the diffs, you also have to create a working copy of the db, which means you use up at least 2x the storage your system uses. in your implementation, the diff blobs are the live db, which saves you ~2x storage. is that the main benefit?
In git, each version of the database will be a full copy. The git has to perform diff i.e. scan the database file. Imagine doing commits & creating snapshots very frequently.
sorry, yes, you mention in another comment the use case of multiple readers operating on different versions of the db simultaneously. that'd be difficult to do with git for the reason you mention.
It sounds like you're in an average FAANG team. You could try switching teams.
Here's why I think you might be in an average team:
>"I have tried over the past 2 years to propose different solutions to hard problems and I just get blown off."
A good team has tough problems, and they need clever solutions. Maybe your team's mandate isn't to solve a tough problem.
>"product managers and “leadership” assign to our team with barely any input on the overall project or ability to propose new projects."
This sounds like you might be in a workhorse/executing engineering team.
You say this:
>"I’m scared to move teams ... because I have a good manager ... and my job isn’t that stressful."
A better manager would be trying to increase the team's scope, and yours. If you're not feeling some stress, your manager isn't growing you. A better manager would create a challenging environment for you where you'd feel like your ass is getting kicked.
There are great FAANG teams, and great FAANG managers. Seek them out! (I'm at Amazon, probably the "A" that didn't make it in your acronym. But if you drop me a note I could introduce you to great managers at Amazon)
Can't believe it can be like that in Amazon. I'm just on 4th month, but want to get out of here. Making myself to wait at least 24 months. After 10+ years experience last time I wanted to get out so badly was fintech
could someone explain the benefit of storing energy as natural gas? once you burn it, doesn't it result in co2? doesn't that defeat the effort? also is natural gas really easier to pipe around than electricity?
I know I'm missing the point of the article so looking for helpful guidance.
Do you want to burn new carbon that’s in the ground, or recycle what’s already in the air?
We have tremendous infrastructure already dedicated to using natural gas (cooking, heating, transport, industrial equipment) and it won’t be electrified overnight.
First get to carbon neutral, then worry about carbon negative.
I’m not getting the problem Anthony is trying to solve. I get that people are trying to keep him at bay, but what is he trying to do that they don’t want him to do? I get that he’s trying to identify pockets of innovation, but what will he do with those pockets?
It sounds like his game plan is to do “cto stuff”. But shouldn’t there be a more precise goal? Like picking some business metric and cause it to move in the right direction? Or define a new metric? Or introduce a fundamental new way for the company to do business? Once you know the specific problem you want to solve in the company, it becomes a lot easier to pick a strategy.
But maybe I’m just misunderstanding what the cto of a 30k person company does.
Brian, you have legitimate points. Here are my edits to your tweets to help people receive them better (i've tried to not change the message, just the tone):
2/ First of all, if you want to do a vote of no confidence, you should do it on me and not blame the execs. I was a little offended not to be included :)
3/ Second, let’s separate the problems that you perceive to stem from a few execs, and those that you believe are core to the company's mission. If you don’t like the mission, your decision is easy: you should leave. If a few unpopular execs, my decision is hard.
4/ Third, making suggestions on how to improve the company is a great idea (in fact, we expect everyone to be a part of that). But our culture is to praise in public, and criticize in private.
5/ Fourth, our culture is to retaliate against whistleblowers. Instead of negotiating with you, if you get caught you will be fired.
"""
>Brian, you have legitimate points. Here are my edits to your tweets to help people receive them better (i've tried to not change the message, just the tone):
>5/ Fourth, our culture is to retaliate against whistleblowers. Instead of negotiating with you, if you get caught you will be fired.
That's just terrible advice - whistleblower retaliation is illegal, and you're suggesting he retaliate publicly? I'd argue that your post could best be condensed to, "Speak with your legal team before you publicly respond to something like this."
You can't just leak anything you want and claim you're a whistleblower. Whistleblower protection is for leaking illegal actions, not for posting a petition that you don't like some executives.
The article is fun to read, but I’m not convinced C’s lack of generics prevents it from supporting fast generic sort. Imagine qsort() being a header library, and a compiler that can inline heavily. What would prevent C from inclining the compare() function, recover the element types and produce specialized sorts?
That misses a fundamental point: that is about equivalent to textual substitution. With enough inlines, the compiler can patch together a specialized version of the function applied with that comparator.
What it can't do is vary details of the implementation, at compile time, according to properties of the types operated on. C++ can do this. Rust can, to a degree. Go cannot, because it doesn't understand much about types. C macros cannot, because the macro system has no conception of types at all. The C optimizer can apply what it knows of types, but you have no way to tell it any more than it can puzzle out for itself.
If you are not used to a language that really supports strong types, you probably don't understand how much of programming work is offloaded onto the type system when using such languages. The C-grade "type checking" such languages provide is just the most trivial possible use of compile-time types. A powerful type system makes a language able to do automatically what you almost always cannot afford to do at all in a language without.
There was a C library - posted here but I cannot remember the name - which used the preprocessor to avoid invoking a function call per comparison. You'd use it something like this:
#define SORT_ELEMENT_TYPE int
#define SORT_COMPARE(a, b) sign(a - b)
#include "specialized_sort.h"
And the header would define a function with the following signature:
I've written code just like this. Another option is to make the entire sort function a C macro. This would be feasible for something simple like quicksort.
But generics provide another benefit: in theory with them, the compiler should be able to determine that two high-level types are actually the same machine type, so in the above example, SORT_ELEMENT_TYPE int and long would not generate duplicate code on many machines.
It's not necessary to use macros. Just make both the sort function which the comparison function is passed to, as well as the comparison function itself, both "static inline". The compiler is smart enough to figure it out.
Why is this limited to the preprocessor? I imagine the compiler proper could inline the compare function parameter into the qsort implementation body in the typical case, at the qsort() call site. (Assuming qsort's implementation was in a header, as the original comment posited).
You're right. I tried it here https://godbolt.org/z/457dYWfq5 and if the generic function is visible to the call site and inlineable, then the compare function can be inlined too. I didn't know this, I had always thought that the semantics of function pointer prevented this from being achievable!
If both the comparison function as well as the sort function which the comparison function is passed to are declared 'static inline' and available in a header, the compiler is smart enough to figure it out and inline the code, provided optimizations are turned on.
Does the necessary pointer casting in the implementations also make it slower than it should be (the specialized versions generated by compilers that support generics wouldn't have any casting)?
Its not the pointer casting, its the indirect function call that probably can be cached but it will always be another memory location that the CPU will need to jump to.
If the compare function is inlined into the qsort() body, there wouldn't need to be any function call. I think that was the point of the question above.
The way to answer this question is to look at the assembly code generated by the compiler with various optimization levels and see whether the compiler ever inlines the compare function.
the matrix example is a good example of latex being too verbose for its markdown host. \underbrace and \begin{cases} are two others ones that seems antithetical to markdown. and maybe the fact that \left[ and \left( are not the default versions of [ and ( respectively. i'd be interested in collecting more if you can think of them.
I collected some in the doc page for mathup (link in cousin post). Although I’m not sure I tackled \underbrace sufficiently. E.g. This is how I explain up-arrow notion with a mathup expression:
I don’t think you’ll be able to read this without knowing some of the syntax... which is a failure on my part as author. `obrace` and ubrace` are clear `.^` puts the following expression (a text that works the same way as backticks in markdown) over the preceding expression. `._` does the same but puts it under. and the backslash will make the thing surrounded by backticks (\`↑↑`) an operator. But this is a fairly complected expression. And my goal was never to make every expression look simple. A far more common expression would be easier:
a^n = obrace(a xx a xx cdots xx a).^(n "times")
which could also be written as:
a^n = (a × a × ⋯ × a).^⏞.^(n "times")
Regarding cases, in mathup could write:
n! = { 1, if n <= 1
(n-1)!, otherwise
However the alignment won’t be perfect... I was always going to go back and fix that, but I never got around to do that.
Other improvements include, using white space smartly to group things together e.g. (This example also showcases using slash to denote fraction)
What's more disrupting, my one little comment, or you bickering with me about it? it's not language policing, it's treating folks with respect. Also, glad you created your account just to say this.
for what it's worth, i was grateful to be called out on my gender assumption. that assumption can cause widespread harm. i'm less concerned about my pronoun assumption.