My suspicion is that Trump will declare a national emergency and suspend elections at the mid-term if it looks like the Republicans will lose seats in the House.
They’re the most likely to go along. The whole point of the army is following orders. Congress doesn’t have the threat of jail for not listening to Trump.
The CTO asked the CEO what happens if we train these people and they decide to leave? The CEO asked in reply what happens if we don't train the people and they decide to stay?
Any reasonably smart company will invest in its employees. They should absolutely be training you to be better programmers while you are on the job. Only shit companies would refuse to do so.
> Any reasonably smart company will invest in its employees. They should absolutely be training you to be better programmers while you are on the job. Only shit companies would refuse to do so.
The latter represents a mindset that's prevalent at a large portion of companies. Most companies aren't FANNGS or AAA Game Studios (w/e) looking for the best of the best, most companies are outsourcing a large portion of work and/or are speeding to the bottom of the quality race. Many aren't even in any position to judge competence, nurture it, or reward it.
They just want "5 years experience" in whatever Cloud crap and Java thing.
> Any reasonably smart company will invest in its employees. They should absolutely be training you to be better programmers while you are on the job. Only shit companies would refuse to do so.
That's true, but by the same token, it's also true the world is mostly made of shit companies.
Companies are just following local gradient they perceive. Some can afford to train people - mostly ones without much competition (and/or big enough to have a buffer against competitors and market fluctuations). Most can't (or at least think they can't), and so don't.
There's a saying attributed to the late founder of an IT corporation in my country - "any specialist can be replaced by a finite amount of students". This may not be true in a useful fashion[0], but the sentiment feels accurate. The market seems to be showing that for most of the industry, fresh junior coders are at the equilibrium: skilled enough to do the job[1], plentiful enough to be cheap to hire - cheap enough that it makes more sense to push seniors away from coding and towards management (er, "mentoring new juniors").
In short, for the past decade or more, the market was strongly suggesting that it's cheaper to perpetually hire and replace juniors than to train up and retain expertise.
--
[0] - However, with LLMs getting better than students, this has an interesting and more worrying corollary: "any specialist can be replaced by a finite amount of LLM spend".
[1] - However shitty. But, as I said, most software is throwaway. Self-reinforcing loop? Probably. But it is what it is.
This reminds me of a quote from dr. House. In one of the episodes with the smart girl that also studied mathematics (I don't remember her name), Cuddy said something like "You will figure this out, the sum of your IQs is over X". To which House replied, "The same applies to a group of four stupid people".
Sometimes knowledge and experience aren't additive: if none of the students had a certain experience/knows a certain fact, the sum of the students will still not have that experience or not know the fact.
I think it's more accurate to say that the company doesn't need as many people with 20+ years of experience but lower energy and as attention to commit to the company or demand higher pay, vs people with 5-20 years of experience and youthful energy and fewer external commitments.
This is especially true now that senior employees have gotten more demanding about wanting to see theit children, which didn't happen at scale in the past.
To say the least, requiring FDA to approve drugs and medical doctors get licenses actually harm citizens. These claims might seem absurd at first glance, but please give Hayek's book "The Road to Serfdom" a read before contending. Hayek changed my whole life.
>
Any reasonably smart company will invest in its employees. They should absolutely be training you to be better programmers while you are on the job. Only shit companies would refuse to do so.
I rather see the problem in US culture: in many other countries switching the company every few years is considered to be a sign of low loyalty to the company, thus a red flag in a job application.
Interning strings saves a ton of space. I wish more programmers would use it.
Back in the 32-bit days I was working on a large (multi GB) distributed Oracle database system but I couldn't use transaction log shipping (don't ask). Database A was the "main" system and database B was the "replica". To keep them in sync I needed a program that would compare the two databases and then generate an update script that would make B look like A.
Complicating things was that, for some reason, floating point data in binary format would never match exactly between the two systems, so all floats had to be exported as text.
The first attempt by a junior dev was implemented in C#. Not only was it terribly slow, but it also ran out of memory.
I wrote a new version in C that interned all strings using a hash table and a custom bump-allocator. I also exported every field in the database as a string, so I didn't have to deal with native types. Using this technique meant that a database record could be represented as a plain array of pointers to the interned strings.
Since each string was only recorded once, and every field was a pointer to a string, should two database records have the same values then they must by definition point to the same string. Comparing database rows was as easy as doing a memcmp() on the two pointer arrays, one being a record from database A and the other being a the record from database B.
Not only was the system incredibly fast, but it never took more than 150MB of memory to run.
This is mostly the real reason why interning gets used, to avoid long string comparisons over saving memory as such.
Interned strings tend to not have a good cleanup mechanism, in a system where a lot of them are churned through. So often they tend to actually use more memory as data patterns evolve in a system.
I use the same trick when parsing json, where a large set of rows tend to have the keys repeated & the conversion to columnar is easier if the keys are interned.
If your language supports good strong/weak references and containers thereof, cleaning up dead interned strings isn't hard. I'm not aware of any language that provides this out-of-the-box, unfortunately.
Why do so many languages make weak references such second-class citizens? Why do all containers suck so much that you have to implement your own (and that's hoping the language is actually efficient enough to let you?)
> string interning package to its standard library
TFA literally says interning isn't there in Go yet.
While the unique package is useful, Make is admittedly not quite like Intern for strings, since the Handle[T] is required to keep a string from being deleted from the internal map. This means you need to modify your code to retain handles as well as strings.
> I'm not aware of any language that provides this out-of-the-box, unfortunately
The currently most prominent example would be Rust. Rc<T> is a simple generic container that implements reference counting, and any instance of it can be downgraded to a Weak<T>. Or Arc<T> and std::sync::Weak<T> if it needs to be thread safe.
I've done it in C++, so Rust is probably capable of it if you add enough layers of rc refcell and whatever else it requires to fit into its restricted worldview.
Does Rust actually have container implementations that do all of the following:
* When walking the container (either iterating or looking up, even through a non-mutable reference), call a user-provided predicate (not just builtin "weak" like many languages have via weakset/weakkeymap/weakvaluemap) to detect if a node should be considered "dead", and if so transparently remove the node. [In my experience this is relatively easy to add when you're implementing the container algorithms yourself, though I've never done it for bulk algorithms yet.]
* When looking up a key (which may have different type or identity), the lookup returns the actual key the container had. [This may be impossible for container implementations that split the key.]
Mutating a container through a shared reference means the container either has to be single-threaded (not marked as Sync/Send), or be thread-safe.
The single-threaded ones are easy to make, but Rust will prevent you from sending them to another thread, which is probably something you want.
For thread-safe things, look into the crossbeam crate, it has really good collections.
One I worked with was the dashmap, which has a .retain() method [1] that works over a shared map reference, but runs a closure which gets mutable access to each key and value, and decides whether to keep the pair or not.
Its .get() [2] uses equality (so you can use a different object), but returns a reference to the original key-value pair. The .get_mut() will return it as mutable, but inside a guard that keeps the item locked until it goes out of scope.
`.retain()` unfortunately isn't what I'm talking about, since it's at least O(n) per call. It might be better if you can arrange to call it just once after a batch of operations, but that isn't always the case.
"Delete as you go" usually† adds no space/time complexity to the operations you're already doing (though it does affect the constant factor). It does mean you're giving up on predictable destructor calls, but generally the "heavy" destructor was called by whoever made it expire (e.g. the death of the last remaining shared owner if that's what expiry is based on).
† If many expirations happen at once, this can easily drop to merely amortized time. It's also possible for a container to offer, say, O(1) iteration via dedicated pointers but have a delete operation that's more complicated.
To the first question, not really, and if it did it would be pretty fragile because of mutability requirements. It's fragile in C++ too because of iterator invalidation, Rust mostly turns that into a compiler error.
I didn't have any problem with iterator/pointer invalidation (easy to merge into the same thing), since holding an active iterator inhibited expiration. It's possible to imagine an expiration system that doesn't automatically guarantee this but I didn't have one; the only non-weak-based expiry I had was based on timers, and it's sanest to only count time as elapsing at the heart of the event loop.
In Lisp, interning is not only used for saving on string comparisons. It's the basis of the symbol abstraction. Or perhaps not the basis, but interning is the only way symbols can correspond to a printed representation. Without interning, we don't have it that A and A are the same object.
A symbol being an object with a durable identity is important because it can have properties other than just the string which gives it a name.
Here's another perspective: I was once asked to improve a custom data caching system that took too much memory even though it had string interning. (At that time, eviction had to be used on factors other than memory used.) String interning certainly helped with memory use but it wasn't enough. Eventually my solution was to compress each record of the dataset in memory. I found that this saved more memory than interning individual strings within each record. At that time I picked Google's snappy compression algorithm since it was already a dependency of the project, but these days I might have picked zstd with a negative compression level or lz4.
This just goes to show that if your primary goal is to save memory, you should consider storing it compressed and then decompress on the fly when used. Modern compression algorithms are good and fast on moderately sized textual data. You might be surprised to learn how fast decompression is. There are of course other benefits to interning like using pointer equality as string equality, but these aren't a factor in my project.
We did a very similar thing in a previous project. Used protostuff to serialize each object, and snappy at the time to compress it. And a small proxy class to access it that decompressed on demand. Costs a few microseconds on read, but saved 4x the space (20GiB -> 5GiB IIRC). This was after interning etc.
I'm sure you can save a lot more space if you compress batches of objects and store it column oriented, but will take a bit longer to decompress individual objects.
Many compression algorithms are effectively string interning that works on general-purpose binary data and adaptively pick the common substrings that are most repeated and assign them the smallest bit representations. That's why formats like XML and JSON compress so well: all those repeated string keys get stored once and then become sub-byte entries in a lookup table.
Good point! And since we can have sub-byte entries in a lookup table, no wonder why a simplistic string interning solution using pointer-sized entries in a lookup might not work as effectively to reduce memory used.
So a fun story about how interning numbers can go wrong: When compiling the apple's ui designs from the xml based xib to a binary nib, their compiler uses lots of interning. It's pretty cool for avoiding 20 copies of an empty string for example. But then they messed up and did the same thing with numbers while ignoring the type... Which means if you have a value 5.0 as a size somewhere, then your sequentially assigned ids will be: 1, 2, 3, 4, 5.0, 6,...
> Complicating things was that, for some reason, floating point data in binary format would never match exactly between the two systems, so all floats had to be exported as text.
Floating point weirdsies between systems is a well encountered quirk in multiplayer gamedev. It's the source of many recommendations that you do physics in fixed point.
"In my [Franklin D Roosevelt] Inaugural I laid down the simple proposition that nobody is going to starve in this country. It seems to me to be equally plain that no business which depends for existence on paying less than living wages to its workers has any right to continue in this country. By “business” I mean the whole of commerce as well as the whole of industry; by workers I mean all workers, the white collar class as well as the men in overalls; and by living wages I mean more than a bare subsistence level-I mean the wages of decent living."
The stock market measures how people feel about a company. The fact that the case is resolved has relieved a lot of anxiety which is enough to drive the stock up.
The stock market is a bull tied vertically with enough bondage equipment to make the director of 50 Shades of Grey puke. Pumped full of every chemical invented and in a glass case on full display for all to see.
Stocks are about expectations, not about how people feel. Big money generally doesn't invest in securities that they simply want to go up. They invest in securities which they expect to go up, or bet against securities they expect to go down. They specifically do not rely on how they feel—they rely on analysis.
Furthermore, a good fund will make money whether the market is going up or down, often aiming for stable returns over consistently positive alphas.
There are definitely some fractal feedback loops regarding expectations, sentiment and price changes, but generally speaking you're looking at projections of future value when supply or demand changes. If a rational investor thinks their portfolio is going to tank because of some event, they're going to sell off some or all of the affected securities, regardless of their desire for the security to continue rising in price.
The largest problem will be finding qualified and vetted personnel. All the people who worked at the plant when it closed five years ago had to find jobs elsewhere. Even though the plant was an important employer in Middletown, I don't know if those former employees will be willing the quit there current jobs to go back, especially if there is a risk the plant will just be shut down again when it once again becomes too expensive to operate.
The Paradox of Tolerance disappears if you look at tolerance not as a moral standard but as a social contract. If someone does not abide the terms of mutual tolerance, then they are not covered by the contract. By definition intolerant people do not follow the rules so they are no longer covered and should not be tolerated.
I think it's actually closer to "terrorists should go to prison". Terrorists and other criminals have broken a social contract, and a level of punishment that some approximation of society deems to be acceptable is extracted from the terrorists. This doesn't mean that terrorists don't/shouldn't have some rights. Similarly, thinking about tolerance as a social contract doesn't require stripping anyone who violates this contract of all of their rights.
FWIW I don't actually have a problem with Jones specifically getting in trouble over defamation after getting his day in court. What I have a problem with is the broad notion that it's generally okay to "not tolerate the intolerant" to the point of forcibly suppressing them. The paradox of tolerance is not really a paradox when we're talking about intolerant speech.
I'm kind of worried about society deciding which speech is "intolerant", so I'm not completely on board with the idea of treating tolerance as a social contract. That being said, if we could stop a genocide merely by suppressing people's speech, I feel like that would probably be a worthwhile thing to do. That is to say, it feels like the least bad way to prevent a genocide.
Again, figuring out which speech is worth suppressing is a whole other can of worms.
EDIT: note that Jones did have his speech suppressed, and this was done because his speech was causing people to make death threats against the sandy hook parents. I feel like we could classify Jones's speech as intolerant against sandy hook parents, and the same logic applies as for any other type of intolerant speech.
Indeed. And one of the wonders of this is that anyone can determine that you have not abided by the terms. Even Stalin’s Russia was tolerant. It merely deemed many people to not abide by the terms of mutual tolerance.
Trump can just take the whole NOAA budget himself now and replace them with a legal pad and a black sharpie. I assume that's the plan. Say, we can just steal anything from any budget now right?