skysight-inc/HackerNews huggingface dataset:
Ask HN: What's a Good Coding Test?
I've been asked to create a coding test to assess candidates during the hiring process.

I have mixed feelings about coding tests; they increase the entry barrier and put the company at risk of losing the busiest persons (who may otherwise be very good).

My own experience has also been mixed. Sometimes the test is poorly written and thus speaks badly about the company (why should I put the effort in taking a test when the person who wrote it didn't take the time to fix the grammar and the requirements?). Sometimes they feel exploitative (write a simple app for candidates to upload resumes to our company, write a case study over the tools you would use to create our new data analysis platform).

Also, don't get me started about the algorithm test you find on many online services.

I also don't like when I'm asked to take a coding test before talking with the company at least once.

Still, a well-written coding test may speak well about the company and could be positive in getting the tech interview started.

What's a good coding test you'd feel like doing? And what other advice can you give me about that, besides the raw coding challenge?

In case you ask, I'm looking for a good developer with a good attitude regarding team play (this is probably not testable with a coding test, but it felt worth saying).

Thank you in advance for any suggestions! :)
This is pretty much how we've been running in production with several different banks over the last half decade.

1 connection per database is critical. WAL is important. Not double-locking helps (most builds of SQLite serialize all writes internally).

You do all of these things correctly at the same time, then you can easily handle tens of thousands of transactions per second.

Additionally, we also do a per session database concept where data is scoped as specifically as possible. Using just 1 sqlite database for the whole application would be a mistake imo.

Synchronous replication is our next step, but we might build something in-house for this.
> For example, advances in DIY biohacking tools might make it easy for anybody with basic training in biology to kill mil-
lions; novel military technologies could trigger arms races in which whoever strikes first has a decisive advantage; or some
economically advantageous process may be invented that produces disastrous negative global externalities that are hard to
regulate

More realistic example maybe is unstable billionaires buying their way to power in democracies through mind control of the public via disinformation media.

(One could view this as a technology problem either of the technology of mind control or the social technology of wealth capture that creates billionaires.)
You got to leave out implementing semantic considerations when starting out. I.e. if your line break changes the meaning of a word, or using hyphens is not allowed in certain words for some languages, those are not technical challenges. They are semantic challenges and solving them will require heuristics or specialized handling.

Although being aware of these considerations is helpful for designing a solution which will be able to address these issues later. Like determining allowed break spots before doing the actual line break. And having that logic extensible.
A $107k/year salary is around $76k after taxes.

I'm Googling and here are a couple of numbers I find:

- Median rent in Berkeley seems to be around >= $3k/mo for a ~700 sq. ft. (2-bedroom?) apartment. [1]

- Family of four estimated monthly costs are ~$4.5k without rent. [2]

I don't know how accurate that estimate is, but it's around $90k/year in expenses, which is $14k more than the post-tax salary.

Curious what your numbers are that suggest this is pretty doable. Of course I'm sure there are people scraping by with much less, but it seems like doing so would need a fair bit of creativity and not be something that would seem "very doable".

[1] https://www.rentcafe.com/average-rent-market-trends/us/ca/be...

[2] https://www.numbeo.com/cost-of-living/in/Berkeley
Any food product that uses terms like "home style" or "home-made flavor" should be required to include large, lurid pictures of the factory floor where the stuff is made.
Pandemic creates new billionaire every 30 hours
No. For that canary you would have to identify the signal associated with companies stopping big expensive ad campaigns. This process can go on for an extremely long time after Google becomes useless for those searching the web. The primary clients of Google are those with big budget ad campaigns, not the people actually using it for search.

> Also we expect alot for nothing! There are consumer review companies you can join, for a fee, to get genuine reviews on consumer products.

Those of us old enough remember, there was a time when online search existed in a goldilocks zone [0] of accuracy, productivity, and reliability.

https://en.wikipedia.org/wiki/Circumstellar_habitable_zone
This reminds me of the good old homecomputer days, where a similar effect could be observed regularly - but back then it was completely a side effect and unintentional.

Back in the day memory was very limited. CPU was slow too, but I'd even say memory was the main limitation. So, programs, and games in particular, used every single byte of the RAM. This of course left the crackers, who wanted to add their intros to the games, with a problem.

The solution was to compress the game to make room for the intro. After decompression it would still fill the available RAM 100%, so where to put the decompressor? You'd put it and ran it in the video RAM, which wasn't needed during decompression. It would be overwritten when the game started, but then the decompressor wasn't needed anymore. The only side effect was that you literally could see the decompressor run on your screen.
>cat /dev/cdrom > myfile.iso

Heh, I remember finding out this on the good old days when I was finding out how to rip cds and shitting bricks. I mean I read it on a BBS and thought "that can't be right"; I was expecting to find something like the Nero suite back in windows.

Much more recently, I enjoyed the same kind of amazement on the bash tcp pseudo devices.
The default fetch.min.bytes is 1, that's true, but the default fetch.max.bytes is 50 MiB.

And fetching small amounts of data repeatedly doesn't impose much overhead unless you're deliberately disconnecting and reconnecting between polls.

And I assure you, you can definitely bottleneck network before CPU and/or network threads, Kafka was literally designed for very large numbers of consumers.

And as for tuning, Kafka The Definitive Guide is pretty much as the name suggests. I've been recommending it very strongly, especially the chapters on monitoring and cluster replication, for years.

You can download a free draft copy of the 2nd edition from Confluent, check it out :)
How is that not describing just a regular IDE like Intellij? The reason it has an indexing phase when you open a new project is because the IDE is building a database of your code base. You can then do many kinds of query against it.
The rest of the western world, may be.
I’m anti-mandate (on philosophical grounds not safety grounds).

Those are anti-safety philosophical grounds, though. Without mandates we'd have significantly higher child morality. We'd also be talking about smallpox rather than monkeypox outbreaks.
You wouldn't expect to buy a house on a single engineer's salary in Europe either. I still think it's far higher when adjusted for cost of living. I know personally a few people who stayed in the US and I think it's for that reason: moving back home you take a huge pay cut.

Btw, here in Germany the industry salary for a senior engineer is 70k max, usually around 50k to 60k. The maximum academic salary is around 50k to 60k. That said, I know people call Germans "poor people in a rich country". Still, we are happy on this amount.
From May 6th
The difference between GitHub and pandoc with GitHub-flavored Markdown as input is that pandoc doesn't sanitize as aggressively as GitHub does. For example, pandoc doesn't remove the backslash-escapes before non-letters as in `\{`.

Not sure if GitHub will compromise here, though.
Provide an argument without providing an argument.
They are not valued on a binary positive or negative cashfows. They are valued at NPV of future cashflows. You can justify a high burn rate with the expectation of earnings in the distant future. But as inflation/rfr goes up then then investors value money today more and more and money in the future less and less.
> it's probably double what they would get for similar role in Europe

Out of curiosity, how much do you believe it would be in Europe post-tax? In California this would be around $76k.
Noise is a secret killer of performance
I struggled with eczema for years. At some point I wished I could cut off limbs and be done with the pain.

Previously, I relied on unhealthy doses of steroids/corticoids and layers of vaseline covered by cotton medical apparel. Eczema got better during Summer (sunlight exposure).

Sainsbury's multi-vitamins have cured me. I don't need a study to tell me this is true
This is very autistic. I love it. I wrote a similar "guide" on how to have sex once I had figured it out.
To be fair the service is so poor here in Germany that it's far quicker to buy fresh produce and cook your own food than to eat out. You have to budget around 2 or 3 hours for a meal here...I guess in the US it is fast to eat out, even at a restaurant. Here in Germany the waiters just ignore you, but everyone is used to it so it won't change
No, pretty much travelling to Turkey, Serbia and so on is possible, and if you have visas to other countries, you can go there and use UnionPay cards to get USD from your account. It's just very expensive and much less people are doing that.
apply composting and have things rot to obliviance.

Do timed purges after various timeouts and keep only printouts 'forever'. Just a thought, however.
It does but what remains of it is not really over Australia anymore.
Spook.el –- spook phrase utility for overloading the NSA line eater
We transferred over our personal site from GitHub Pages to Neocities
I live in Europe and eating out at the canteen every day seems super normal to me. That is where majority of employed people have their lunch and that includes multiple countries I was in and lower paid jobs.
Germany does not have the egregious housing costs of Berkeley. It’s entirely possible to feed one’s self on that amount but not really get adequate housing, and certainly not what you’d imagine as middle class stability.
a rant on google would have been a more appropriate title
I think your example illustrates why it's so important to choose the right way to generalize/share code depending on the circumstances. I've found that when there's a 90% overlap between 2-3 use cases, many people tend to go with "one common code path for all that's shared and then inject the 10% difference in via components/callbacks/config vars". This works reasonably well when the flow of execution is the same and what changes is just the specifics of some of those steps. But if the differences are also in which steps even happen, then in my experience this approach couples the whole thing too tightly and makes it harder to reason about what actually happens in a given configuration.

What I like to do instead is break the shared code paths into a palette of smaller subfunctions/subcomponents and then have each use case have its own high level code path that picks and chooses from these subfunctions: One does ABCDE, another does ACDEX. It makes it supremely easy to reason about what each of them actually do, because they read almost like a recipe. It becomes a sequence of high level steps, some of which are used by several use cases, while others are unique. I've found this way of generalizing is almost "cost free" because it doesn't really couple things at a high level, and it's the kind of readability refactor that you'd often want to do anyway even if the code wasn't being shared.
Yep, agree. I thought that they might have been referring to that recent log4j2 vuln, but yeah, clarification welcomed.
The problem with translations is that even the best translators can make mistakes because when you just send them a list of strings they are unaware of the context where these will be used. And then you end up with "Key" being translated as "Taste" (key on a keyboard) instead of "Schlüssel" (which would have been appropriate in the Windows Registry Editor) in German. So the translator should be:

* fluent in both languages (including domain-specific tech lingo)

* intimately familiar with the software

* very thorough (has to ideally check each and every string if it works in the context of the software)

...only then will you get a high quality translation.
I'm not surprised. As said: it seems to be a matter of luck more than anything else.
Isn't the issue that humans will never accept something is finished. People have spent many years sorting many things but at some point someone suddenly decides (for good or bad) that sorting could be better, that files could be done differently, that ext4 is no longer suitable for scenario X and they start inventing something new.

Most of these things probably die after a while if they are ever really well-known but if you work for some FANG (or whatever it is now!) company, you might have enough resource to force the new way of thinking onto everyone else so that FOMO kicks in unless you are also using the new best thing.

In so many cases, people get religious about differences that might affect Google or Amazons bandwidth usage but no-one elses (like using a new image format). I wonder how many developers, particularly web developers, actually know for certain which parts of their system are unreasonably slow and actually need to change?
I've lost count of the number of times I add 'reddit' to my google search queries.
> dd if=/dev/sda | gzip > image.gz

Last time I researched this, a long time ago: `lz4` is (was?) your best friend.

Oh, but - to follow the submitted article's "rant" - if one wants to use `cat` instead of `dd`, shall there be freedom... Sometimes people like some kind of form-aided "readibility and clarity and method", which leads you to forms like `cat filename | grep` .
> a niche product that any site actually talking about it

Say you make such a site, to review the 8 machines as mentioned by Adam. You're probably out $12-$15k just to get your hands on a decent set. Whereas the seo parasites that google refuses to stop enabling (largely because they get google paid; weird how that works, eh?) pay someone $10/page to spew content.

Yet another thing google and amazon have ruined by monetizing/incentivizing ultra-low quality leadgen masquerading as content.
Synology C2 Partner Program Update
More and more people being useless attention seekers? :D

But seriously and on topic, we kind of forgot a lot of real-life meat-space skills so I'd say "ignorance of the physical world". I am willing to work a bit harder so I don't worry about money and then work on regaining those skills.
Anything A3+ (13” x 19”) or smaller in the commercial printing industry is pretty universally considered “small format”. (Some places consider anything sheet-fed as small format and sheets come a lot bigger than A3+.)

It’s not surprising that searching using a specific industry term that’s different from your understanding of it would bring results for that larger-than-you-thought category of product.

Further, the smallbiztrends article that comes up first for me, that Adam claims “not a single one is an actual laser printer”, contains several printers that use the same dry toner, electrostatic process as laser printers and that most people outside of printing, if asked to name the printing tech, would call a “laser printer” (because they’ve never heard of an LED printer). The print quality issues that started his search were likely fuser-related not laser-related, meaning these colloquially incorrectly called laser printers would have been fine.

Search engines have problems, but this video isn’t hitting on them for me.
Author here.

I've been a managing editor for scientific journals for a number of years, and I can tell that -- while $ is still popular -- (almost) nobody uses $$ anymore. So I wouldn't say this is "where people already are".
How do you handle LMUL>1 without "looping" across the multiple destination registers?
Can anyone more familiar with Rust shine some light onto this issue?

From a cursory look, Rust does not rely at all on GitHub. Neither does Rust's crates format, which already support multiple sources including from git repos and package registry sources.

https://doc.rust-lang.org/cargo/appendix/glossary.html#regis...

Apparently Rust's Cargo package manager specifies crates.io as its default package registry source, but from the looks of it nothing stops anyone from providing their own package registry.
Yes, but you absolutely will be able to buy a flat as a single engineer. That would not be extraordinary at all. In many places, a house in America is what apartment in Europe is - the prevalent kind of housing supported by government policies, zonings and what not.
I wonder what happened to RDF at BBC.

There must have been an earthquake around 2014?

I was deeply impressed and inspired to my toy-project radio recorder. Check $ rapper -i grddl -o turtle 'http://rec.mro.name/stations/b2/2022/05/23/1005.xml'
Most game consoles are amd64 or ARM. Running java there is trivial.
Author here.

That is interesting! Have you tried it on the examples in the blog post? I'd be curious to see.
In France, it's difficult to have a nice meal for $15/15€, unless you are talking about ready made food/metros served in restaurants.
And company restaurants are awful.
Very low interest rates and high asset prices indicate that 2020s can be another lost decade for investing that follows the great decade of 2010s. 2000s was also a lost decade, and unfortunate thing about it was that even if you managed to time the bear market perfectly and entered at the very low in 2002, the decade would still be lost to you, because the market in 2009 was below 2002 lows.
Also, using SIMD registers is (generally) forbidden in kernel code, which heavily narrows down the competitors to "rep stosb".
Honestly, if you don't know that many US universities suffer from the dual problems of overpopulation and under-investment in undergraduate pedagogy, the concept of weeder courses would seem wholly counterintuitive. It's pragmatic, but at the same time because it mostly benefits those who go into the class already knowing the content, so at some point you wonder if degrees are slowly just becoming glorified certification programs.
Researchers Found a Better Way to Detect Earthquakes with Subsea Cables
There are rotary mobile phones available today:

https://skysedge.com/unsmartphones/RUSP/index.html
https://news.ycombinator.com/item?id=31166026
> This is a terrible advice. According to this, a classic program that loads data from a file, processes it, then writes the results to another file should be a single giant main() that mixes input parsing, computation and output formatting. Assuming file formats don't change, all of those would be used only once. CS 101 style. :D

Yes, if the program will be written and tested exactly once, with no change requests to come later, it's perfectly fine to write it as one big main().

It all depends on what the stakeholders need, clear communication with them is the real trick.
Why is this popping up everywhere right now? This has been integrated in the Reeder RSS app for ages.
“This site may harm your computer” on every search result (2019)
Products Are Not Platforms
Couple of issues with the article.

1. The proof that basic commodities are extremely volatile is a page on understanding investing. https://europe.pimco.com/en-eu/resources/education/understan...

2. The notion that prices are driven by financial speculation is only supported by a graph that shows the price of wheat changes while production has remained the same. Which is really insufficient to make that conclusion. I do think that the fact the prices went up during the 2008 financial crisis might be worth pointing out, but at least on Wikipedia https://en.wikipedia.org/wiki/2007%E2%80%932008_world_food_p... there's a whole list of possible causes listed and none of them addressed in the article.

3. The article never attempts to quantify even roughly how much of the food price increase is due to financial speculation versus the drop in supply, even though there isn't much proof for the former driving sustained food increase on the macro scale whereas a drop in supply leading to price increases is inevitable.

4. The author seems to object to deregulation of the commodities market without actually linking/or having any analysis on its impact on commodity production and prices.

5. The author decries bankers 'ploughing capital' into commodities market, but putting capital into at least the futures market is exactly what leads to more of it - e.g. more food.

I would say in general when making a case for something as important as the issue of food security, and imposing drastic change in national policy, you can't just start with the assumption everything bankers touch is bad and then carry on from there. You should at least address counter-points to your arguments even if you are not able to completely refute them, instead of pretending like they don't exist.

I think the goal of preventing food starvation is a laudable one but as in most cases I think the most efficient way of doing so would just be through aid/loans to the people who are suffering the most instead of trying to ration out the current supply of wheat to the whole world. I think in a world where most nations struggle to even care for their own poor, it is still refreshing to see the case made for a place where we try to alleviate suffering regardless of the location of it.

But I would say the whole scale rejection of free-markets is likely to be counter-productive, especially in the long run. The most successful poverty elevation programmer in the world occured when China opened up its economy, embracing free markets and foreign investment (e.g. money from greedy bankers).
Because then you need two machines :)
Effects Covid-19 Lockdown on Mental Health, Environmental Concern, and Prejudice
Does anyone else remember wikihow.com and its bizarre and surrealistic illustrations?

I'm pretty sure DALL-E could get a job there.
I'm not aware of it. any examples/links?
In Sweden there is a single cross-platform payment app since >10 yrs called Swish which all the banks are connected to, and you transfer money by entering the recipients mobile phone number and the amount. No fees and the transfer is instant.

I guess it's luck that some countries happened to get the banks to agree to something like this at the particular time when the technology needed to support it just had matured (in Sweden a government supported e-ID had just become prevalent), and then it's kind of difficult for them to pull out and say "now everybody should pay for it".

Here you can pay with Swish in most stores as well, but the prevalent payment method there is still mastercard/visa I think.
Archaeology Institute Fighting British Museum over 3D Scans of Parthenon Marbles