An interesting feature of ribbon mics - because the ribbon is open at the front and the back, they reject sound from the side (and top/bottom) almost perfectly. You can arrange these cleverly in live or studio settings to amplify one thing while rejecting another completely.
A typical usecase for this is a singer with an acoustic guitar - one mic can pick up the guitar and almost fully reject the vocals, and vice-versa. Pretty cool.
What benefit do they provide in testing scenarios? I've never written Kotlin, but from an outsider's perspective, it seems like a slim benefit, outweighed by the cost of the mere existence of this syntactical oddity in the language's grammar.
When writing tests, you can name the methods more useful things, such as:
class MyTestableClass {
fun `methodName - when input does not parse to valid regex throw exception`() {
}
}
It's pretty clear what is under test in a situation like that. That's basically the only situation I ever see it used in (and would code-smell the heck out of it if I saw it in other circumstances).
People who are familiar with RSpec-style testing are very used to this sort of thing.
describe MyTestableClass do
context 'input parsing issues' do
context 'when not valid regex' do
it 'throws exception' do
...
end
end
end
end
Anecdotally, I've also found that such style naming for tests allows me to write out the desired names for all the tests ahead of time more easily and then implement them. That happens to be my flow.
This study only compared camelCase to snake_case and what the results are mixed, depends on what you call "hard to read". They only seem to have tested finding identifiers from a word cloud, and it did take more time to read camelCase identifiers (although they were also resulted in more accuracy).
It's important to note that the researchers only tested short phrases with 2 and 3 words. "getNextPath" is a different beast compared to "methodName_whenInputDoesNotParseToValidRegexThrowException".
On the other hand, there is a good body of research that generally shows that proper sentences (not just 2-3 words) without spaces are harder to read, at least for English speakers[1]. Early medieval Latin manuscripts did not use space between words[2]. The fact that spaces were seen as an improvement when they were introduced, is probably telling.
[2] Roman-era inscriptions did use an interpunct (a small middle dot) to separate words, but this practice fell out of fashion in Late Antiquity and Early Middle Ages and I'm not sure if it was ever the norm in handwriting.
Sure, but I like writing the other more. It's entirely a style thing and you're not required to do it :) it's also basically only ever seen in tests :)
That doesn’t seem to be the case based on the study. And normal for one thing, such as paragraphs of prose, might not translate to another thing, such as a sequence of words in a line of code.
I like how tests are made in Python - you don't even need classes, just functions, and use a single assert keyword for everything. Also it's easy to parametrize them using decorators.
Also, once you get used to assertj, you'll never want single-assert again. It's fantastically useful to know (for example) not just that two lists aren't equal, but specifically what elements differ.
If the list contains numbers or strings, you can use
assert sorted(x) == sorted(y)
If you want to add map, then you have to write
assert list(sorted(i.getValue() for i in someCollection)) == [3, 4, 5]
If the list contains non-sortable values, but they are hashable and unique, you can use sets:
assert set(x) == set(y)
If the values are not unique, but hashable, you can use a counter (like a set but with count for repeating values):
assert Counter(x) == Counter(y)
(by the way I learned about this trick from a LLM)
And if the values are neither sortable, nor hashable, you'll have to write a helper function.
But still, pytest tests are less wordy and they don't require you to create a class.
This situation is familiar to me, I had to write such helper function when writing tests in PHP, for some reason it is not included in PHPUnit assertions.
Parameterized tests are a huge, huge win, yeah. I am a big fan of them and look for how to do them in every test framework I use. RSpec was the weirdest for me; but NUnit and JUnit have been quite easy, and I'm not surprised at all they're easy in Python too (admittedly, I don't remember if I ever wrote them in that language).
In the RSpec case, those don't have to translate to method names with embedded spaces. It seems that using fun `...` instead of a dsl: test "..." is the mistake.
It's a place to put intetion that isn't so much of a second class citizen that it will likely be ignored and/or not updated if it ceases to be true. You want your test methods fine grained (many methods that each check one variation, instead of one method that checks a whole list of them) and every extra redundancy (method naming vs the variation of data actually passed vs documentation) increases the the chance of those redundancies getting out of sync.
In fact I've occasionally found myself writing reflection code to parse the test method name as input just to avoid that problem altogether (for name and data, not for documentation). And that was in plain Java even, the pattern could be far more useful with that kotlin naming freedom.
It reminds me of Spock tests written in Groovy. I have to help maintain a code base like that now at work where a Groovy zealot (who has moved on) convinced the teams to write tests in Groovy instead of Java.
When a test fails, the method name describes what it was supposed to do written out like a sentence enclosed in double quotes which seems like a win but not much of one.
When you need to add a new test or analyze if an existing test needs to be changed, you have to eyeball all the code in the test class because even with methods named with spaces, it's not always indicative of what it does.
With Java, I can sort a list of method names and have a better idea immediately what needs to be updated or added.
Spock is an exercise in syntax cleverness with regular confusion opportunity and little gain IMO. Way too much implicit syntax that IDEs struggle with.
Refactoring Spock tests sucks due to how the context is different based on the clause you’re in.
Isn't this breaking Jakob's law of the rest of the tooling though? I can se flows borking with something like "x failed at expect" in a majority of reporting tools not specifically meant to deal with this spaces in functions stuff.
Not really—-most CI reporting is based off junit/testng report XML files. I doubt your CI reporting is parsing out test names with regexes out of log files.
One thing that I found super interesting when I studied audio engineering is that our ears are very good at determining direction left/right, but absolutely hopeless at working out if a sound is up or down.
This makes their hypothesis a lot more believable to me; I can understand others incredulity.
> I can’t think of any other place where people’s sense of net worth is as tied up with their house price as it is in the UK, while at the same time the increase in house price that people have been conditioned to believe is the norm over the last decade is wholly unsustainable given the stagnant wages.
Also New Zealand.
Surprise! It's a global phenomenon where governments across the world have done everything to ensure housing is the safest investment there can be.
As prices go up up up those with, gain, and those without are left paying outrageous sums for rent to pay for someone else's higher and higher mortgage prices.
No its a 5 eyes psychological warfare program based on Maslows Hierarchy of Needs.
So shelter is an essential base layer, and by promoting home ownership, banks are now being used to mess people around if they get out of line in a deniable ops way. If you cant even afford a home, you have that psychological inferiority put on you by only being able to rent.
The state is always looking to reduce costs because it can claim to be a low taxation nation, and in reality prisons cost alot, so rather than feel the long arm of the law and end up in prison with todays global technology and ability to look anyone up, causing trouble in peoples home life is now the 5 eyes modus operandi.
All sorts of low level stuff going wrong designed to keep a individual busy rectifying said problem, whilst also getting flack from those around them.
Its thought people will fight/work harder trying to maintain their home and their life and their families life, so all sorts of low level bad things will happen to an individual or household.
Its actually quite nasty some of the things that get done to people, but its always in a deniable way, made to look like incompetence or bad luck, and thats hard to prove because of the way society works. You couldnt tell if a washing machine engineer has deliberately sabotaged your washing machine in a planned obsolesce way or not, but the military leak rumours about people and then people take it upon themselves to contribute to that harassment and intimidation.
Things like reddit malicious compliance can give you a taster of some of the things people choose to engage in, but others will take it to the next level which puts peoples lives at risk. Ultimately its called Karma, but the military will pursue you around the country so you even get hassled on holiday.
This is a list of some of the things thats been done to me.
Stopped by the side of a busy road, engaged in conversation and casually positioned so my back is to the road before individual did something to make me step back into the road in front of moving traffic. Its a high curb so I would have fallen backwards into the road.
Head (nose) shot by someone using a silenced snipered rifle whilst walking my dog around a footpath in a farm.
Ex directory, countless unknown numbers, international numbered phone calls or call centres. Got a new phone line put in, and started to get the same on that number even though I'd only given the number out to one car dealership.
Hassled when holidaying in various places of the UK.
Post going missing.
Arrow fired into garden, drones flown into garden.
Someone filing tax returns for me, when I havent.
1mm diameter x 25-30mm long metal added to takeaway kebabs designed to get lodged in the throat, or do damage to the inside of you mouth.
Someone release a small deer in front of the car on an unlit section of dual carriage. Person was hiding behind the armco barrier that makes the central reservation and was trying to cause me to swerve and crash.
Over powered cars pulling out to over take forcing me into the verge to avoid a head on crash.
NHS claiming letters lost in the post. Fake stuff added to doctors notes, creating fictional events.
Courts claiming letters lost in the post in a bid to secure a conviction in my absence for speeding.
Countless malware forcing me out of business.
Program code being changed so my own software stops working.
GCSE Exam results marked down, A-level courses getting messed around with making it untenable to study.
Been drugged in social and home settings, and had things done to me.
You'll literally get driven to suicide but the ambulance staff will resuscitate you, for more of the same.
Reported to police, police not interested!
All of this has taken place in the UK. The people behind it are in a position to deny their activity as they automatically have more authority than I would have in court. It also coerces you to get more security, like cctv fitted inside the home and office which enables greater surveillance which is what the spooks want.
nit, but this is usually accomplished with plasma donation (plasmapheresis) rather than blood donation. You can donate plasma much more frequently (2x/week) vs blood (once per 2 months), thought the volume taken for each is roughly similar.
The filters used must be a specific size, so how micro, are micro plastics? If they keep breaking into smaller pieces, wouldn't they be cell sized too?
And thus, pass cell sized filters?
So you filter out the blood cells (45% of volume), toss the plasma (55% of volume) and return blood cells + clean plasma. Any substances the plasma are gone. So this is useful to the extent that the substances you care about are free in plasma. At least in the case of PFAS ("forever chemicals") that seems to be the case, see "Effect of Plasma and Blood Donations on Levels of Perfluoroalkyl and Polyfluoroalkyl Substances in Firefighters in Australia", which found that 52 weeks of plasma donation reduced PFAS blood levels by ~30%. This was more effective than blood donation, which reduced levels by 10% and 0% depending on the specific substances you look at.
Ah, I see, sorry for missing your point. In the paper they injected particles of size "9.55 µm, 1.14 µm, 0.293 µm", and it looks like a red blood cell is 8um. So a purely mechanical filter that got red blood cells would retain the largest of those particles but potentially not the rest. But plasmapheresis uses a combination of centrifugal separation and filters so may be more or less effective than that depending on the properties of the cells and plastics.
“Excuse me, did this blood come from a vegan? I couldn’t possibly accept blood that isn’t 100% organic, free range, and —-“ (transcript ends, patient died)
The only feasible way I see for removal is via donation or some form of hemodialysis. As the saying goes, the solution for pollution is dilution (or at least in the medical sense!)
You don't need to feel guilty. Microplastics are pervasive to the point where everybody already has them in their blood, so people receiving blood with them in it are getting any noticeably net harm done to them. If you're in need of a blood transfusion the alternative is usually death, so all things considering maintaining the status quo of microplastic levels already in you isn't the worst thing ever.
Pinterest is an odd case. It's not quite like usual SEO spam because it's immensely useful for what it is (collecting images and links while planning stuff, art references, etc). But then they use whatever sneaky tactics they use to flood search, so people who aren't Pinterest users think it's garbage. Pinterest probably doesn't need to do this to rank highly since it's actually useful. I don't know what they're thinking.
It's really odd that people on HN see the world as west vs. Slavic countries.
The world is MUCH bigger than that, and telegram has much wider spread than that. But yes, twitter spaces is tiny fringe space even in the "west"(a term that always bothered me given how the world is round, and how Australia, New Zealand, and Japan are somehow part of "the West").
For what it's worth, when I hear "the West" I think of what would on a global, historical scale be known as the "far west", i.e. mainly north and western Europe. (The "near west" would be the cultures just to the east of the Mediterranean, I suppose.)
I would never bunch Oceanic or Asian cultures in there.
I'm surprised to hear other people use it in a broader sense. At some point one is talking about cultures that are so different it's no longer meaningful to generalise across them.
I suppose that's because they are heavily influenced by western European countries. Two of the countries you mentioned are part of the British Commonwealth.
Why not simply say "Health" then? How is cultural assimilation any better than a phrase that has not had religious connotations for a century and a half?
Location: Ontario, Canada
Remote: Yes
Willing to relocate: No
Technologies: Android, Kotlin
Résumé/CV: https://www.linkedin.com/in/adam-bennett-4784b327/
Email: info@adambennett.dev
GitHub: https://github.com/ditn/
Android Engineer looking for a Staff or Lead role, ideally at a more established company but it depends on the problem space. I've worked and lead teams at fintech startups and most recently at Twitter 1.0, and I'm recognised as a Google Developer Expert in the industry.
Looking for new challenges and a chance to grow - I'm at my best when under some pressure and surrounded by smart people.
A typical usecase for this is a singer with an acoustic guitar - one mic can pick up the guitar and almost fully reject the vocals, and vice-versa. Pretty cool.