How much income inequality is fair? - <AUTHOR> https://arxiv.org/abs/1806.05262 <comment><AUTHOR> I think this is an extremely interesting paper to discuss, because it is rather polarising.

A)it's based on an ideal free market society, which is not really existent

B)it's written from a capitalist viewpoint

<comment><USER2> Your point A is exactly right, People do weird things when they are starving, have a gun to their head, or take pity on someone else.

In the USA,I dont trade you my horse for your boat. We both are forced to work in unhealthy desk jobs to make barely enough money to pay our rent because neither of us can afford to navigate the complexity behind being in business for ourselves and because living on the street is basically illegal and difficult.

So if we ever do save up enough money for a horse or a boat, the transaction is filtered through the prism of multiple corporations and levels of taxation...</comment></comment>


Leaked draft details Trump's likely attack on technology giants - <AUTHOR> https://arstechnica.com/tech-policy/2020/05/leaked-trump-order-is-a-wide-ranging-attack-on-facebook-and-twitter/ <comment><USER2> [https://news.ycombinator.com/item?id=23333496](https://news.ycombinator.com/item?id=23333496)

[https://news.ycombinator.com/item?id=23334830](https://news.ycombinator.com/item?id=23334830)

[https://news.ycombinator.com/item?id=23336902](https://news.ycombinator.com/item?id=23336902)

[https://news.ycombinator.com/item?id=23332177](https://news.ycombinator.com/item?id=23332177)</comment>


Can Authorities Cut Off Utilities And Pose As Repairmen To Search A Home? - <AUTHOR> http://www.npr.org/2014/10/29/359725475/can-authorities-cut-off-utilities-and-pose-as-repairmen-to-search-a-home <comment><USER2> > the FBI provided two blank CDs, claiming the recording devices malfunctioned

The levels of day-to-day corruption within the US judicial system are almost comical at times, scary at others...

Between the police constantly getting away with committing crimes, prosecutors essentially blackmailing innocent people into pleas, and judges often ignoring the rule of law (with VERY shaky justifications), it seems like the entire system is fubar.

The US system is just corrupt through and through. I see nothing redeeming about it. The only people who seem to [sometimes] receive justice are the rich, and while that is the case on other countries, in many of those countries that is a "scandal" in the US it is "working as intended."

<comment><USER3> My opinion is that the levels of corruption in the American justice system have always been the same or are tending to decline in aggregate, similar to violent crimes (I don't have any statistics for corruption). It just seems that the opposite is happening because of the ubiquity and lack of cost associated with mass communication. To put it another way, when corrupt actions occur in a particular case, hundreds of thousands and possibly millions of people hear about it. This didn't always used to happen, especially when mass communication was centrally controlled by a few broadcasting corporations.

<comment><USER4> The Corruption Perceptions survey is a useful metric. The USA tends to hang with Japan around the high teens in ranking year after year. Interestingly, there is a wider variance in perceptions of American corruption than for other countries.

<comment><USER5> >The Corruption Perceptions survey is a useful metric. The USA tends to hang with Japan around the high teens in ranking year after year. Interestingly, there is a wider variance in perceptions of American corruption than for other countries

I think the perception of corruption is interesting, because overall the West is far lower than elsewhere. Link for those interested: [http://www.transparency.org/cpi2013/results](http://www.transparency.org/cpi2013/results)

While when you actually talk to people, corruption in the West is pretty widely acknowledged and even outright accepted. For example, when the NSA stories first broke the reaction on Reddit was largely a mix of:

"Duh, this is confirming what we already know"

and

"Well, it's not like other countries aren't doing it too" (even though, at that time, only the NSA was being highlighted and there was little/no news about their European, Canadian, Australian etc. counterparts.

What had been previously relegated by the mass populace as conspiracy theory nonsense was very quickly accepted, and then very quickly relegated to acceptance.

What this would lead me personally to believe, from just watching these things unfold, watching the mass reaction to it and then talking with others about it, is that we in the West widely acknowledge corruption here but out of a combination of a feeling of powerlessness (what am I, Joe Bloggs, going to be able to do about it), being removed from it (this doesn't affect I, Joe Bloggs, all that much) and probably an inherent sense of nationalism (well, it's probably much worse over there in that other country) we actively downplay the level of corruption in our societies, and I believe that this probably ends up being reflected in these surveys.

I've no doubt that the above is conjecture, but it's just what I've formed from my own experiences. There is a very marked feeling of powerlessness though, and the little action taken, even political action, over the things that have been exposed in the West would solidify that opinion somewhat more.

</comment></comment></comment></comment><comment><USER6> Normally these discussions get framed in terms of "rights" and how the FBI are violating them, but the average person doesn't care a lot about their abstract rights. It doesn't register. The real issue, and what bothers me, and I think the FBI here don't "get", is that when they pull these stunts, they are helping the real criminals. In court, when someone who is actually guilty of a crime can show that the FBI did this sort of stunt, they can often appeal and nullify the entire sentence. Criminals can end up going free because the law enforcement felt it had a right to do whatever they wanted. When law enforcement acts in disregard to the law, they are not only breaking it, but aiding the real criminals escape justice.

<comment><USER7> I also don't think we should frame discussions in terms of crimes, criminals and justice. It's more like corporately sponsored regulatory code, code violators, and punishment if you're poor or a minority.

<comment><USER8> While I agree, poor minorities may be the most frequently punished, but they are by no means the only ones.

</comment></comment></comment><comment><USER9> If it is true the FBI tried to cover their asses, heads should roll. This kind of stuff is so despicable. If it is inconvenient to get a warrant, then that's where your job ends.

My civil liberties should not be crumbling because of overzealous FBI agents going after some silly illegal gambling.

<comment><USER10> When you look at it from the perspective of the officers, this plan was a win- win proposition. Even if it gets thrown out it court, they stopped the allegedly illegal operation. When there is no consequence to the officers themselves for their actions, then the ends will justify the means.

(It's unjust, unethical, and possibly illegal, but it's the same reason people are still reading and discussing Machiavelli 500 years later.)

<comment><USER11> It's only win-win if no heads roll, as the parent proposed.

<comment><USER5> The odds of heads rolling, going by previous non-attempts at holding these agencies responsible for their actions, seem to be low enough that they're quite happy to engage this behaviour without fear.

And as for bringing about a change that would see future incidents causing them to be held accountable? I think the average person, and therefore the population, feels entirely powerless in that regard. I mean the US voted for a supposedly liberal, progressive President who even has it on his campaign website [1] that he would "Protect Whistleblowers", who has then gone on to prosecute more whistleblowers than all other President's combined [2].

So it's no wonder why people feel powerless, and it's no wonder why any change to these situations is certainly not coming in the visible future.

1\. [http://change.gov/agenda/ethics_agenda/](http://change.gov/agenda/ethics_agenda/)

2\. [http://www.theguardian.com/commentisfree/2012/sep/05/obama-c...](http://www.theguardian.com/commentisfree/2012/sep/05/obama- campaign-brags-about-whistleblower-persecutions)

</comment></comment></comment></comment><comment><USER12> This sort of thing is standard secret service wave blank paper to gain entry

[http://www.jrn.com/newschannel5/news/newschannel-5-investiga...](http://www.jrn.com/newschannel5/news/newschannel-5-investigates/Police- Chief-Accuses-Secret-Service-Of-Misconduct-279207151.html)

<comment><USER13> I hadn't heard about that. That's awesome that the police chief is taking them on about this. It's becoming rare to hear about police chiefs doing the right thing when it comes to abuse of power.

<comment><USER14> I think that's selection bias creeping through. It's easy to remember the really negative events and less so the mundane, positive ones. Perceptions is reality and all that.

<comment><USER15> I'd think that the selection bias would make far it easier to remember the _positive_ events in this situation. This event would not have made the news, and no one would have been aware of it except for the victim if the police chief hadn't raised an (apparently huge) stink. If it's difficult for the Nashville chief of police to get traction on an incident that happened within his jurisdiction, what chance do you have?

</comment></comment></comment></comment><comment><USER16> I have a story similar to this, though it didn't involve the police actually searching my home.

In March of 2011, my St. Louis hosted an Occupy convention - which was mostly workshops/lectures and some very tame marches due to out-of-town folks. My roommates and I had been involved for a bit and some had given our address out when arrests were made.

This was prime-time for police intimidation (including of witnesses) and undercover agents. We were aggressively tailed by unmarked cars, had police writing down license-plates of those at our house, and had a constant police presence circling the block and down the alley.

Aside from very close friends being intensely beaten for participating in a march that was staying on the sidewalk (a scene that still haunts most of us) - the most corrupt thing that happened to us was when they worked with the local Electric company (Ameren UE) to have our electricity shut off.

We called the electric company to find out why it was shut off when the bill had been up-to-date and were told they were ordered to by the police due to the house being declared Condemned and us being labeled as squatters.

We had some pro-bono lawyers who advised me to threaten the electric company with legal action - which made their representatives quickly make up a legal excuse as to why our electric was shut off. I informed the landlord, who checked into it and found that it involved a Sergeant with the St. Louis Metropolitan Police Department.

The conversation between then went something along the lines of: \- Landlord: Why has the house been declared condemned and the electric shut off? \- Police: This house has been involved with Occupy and often serves as a meeting place for it. \- Landlord: Ok... Is it illegal to hold meetings in a house? \- Police: Well... No... \- Landlord: Then we shouldn't have a problem.

Probably helped that the landlord is a high-ranking official in the nearby Air Force base. Within 24 hours, our electric was reconnected.

My take-away from all of this, and the current events, is that the best course of action in dealing with aggressive and usually illegal police activities is to fight back with an even more aggressive legal campaign as well as establishing a very close and open relationship with all surrounding neighbors. Their fraternity acts as an organizational bully that constantly pushes what they can get away with until they sense actual danger to themselves/their jobs in terms of legal ramifications, etc.

<comment><USER17> My takeaway from your story is that the high connections your landlord probably had to draw upon was the reason you prevailed with the electricity company.

<comment><USER18> His point stands. Don't make it easy for them, this is wrong and they need to be made to understand that it's unacceptable for them to pull these kinds of stunts.

IMO he shouldn't have let it rest after the electricity was turned back on, he should have pressed the matter by trying to contact the media about this and by getting a written statement from the landlord regarding the events for future reference, and should have written a blog post about it.

</comment></comment></comment><comment><USER19> These FBI agents are criminals, pure and simple.

Not that I think they'll be held accountable for their crimes, much like they weren't for the other lies that they've brazenly told in court related to parallel construction.

However, it's apparent that they don't actually care what the law is, and are perfectly willing to violate it when they feel like they want something that the law forbids them.

Disgusting.

</comment><comment><USER20> Wow, I'm amazed this happens in modern USA. Such methods reminds of KGB in Soviet Russia or Stasi in East Germany, where agents were often "employed" as cleaners, housekeepers, electricians, doormen etc. Looks like the whole warrant system is broken and often used only to cover up the "parallel constructions", in other words, some kind of PR stuff.

</comment><comment><USER18> I once caught a pair of police officers trying to break into my home through my 2nd story bedroom window (while I was sleeping) in the middle of the day.

I was home and caught them in the act, which was evidently unexpected because one of them nearly fell off my roof when I asked them wtf they were doing.

They claimed they had received a 911 call from my home, despite the fact that I was asleep and was home alone. After searching the home myself looking for a possibly incapacitated relative (with them in toe, despite the fact that I had not granted them access) and finding no-one, they left. I asked around, and this apparently happens very frequently in my area.

If there's a 911 call and it is disconnected, that does sound like grounds to at least attend to the residence. But breaking and entering when there aren't signs anyone is even home? I have a hard time agreeing that this was called for. I now live in an apartment building or I would block my windows from opening wide enough for someone to enter through them.

<comment><USER21> How did you confirm that they were actual police officers?

<comment><USER18> Fair question.

They had police uniforms, complete with radios which were squawking occasionally, they had a police cruiser complete with Toughbook, and it appeared to me as though the older officer was training the younger one. All in all, I'm not 100% sure, but I'm pretty certain.

<comment><USER21> Sounds reasonable. My first thought would've been that these are impostors, but that's a rather complete set of props.

</comment></comment></comment></comment><comment><USER22> The worst case scenario for the FBI is that the evidence gets thrown out in this one case. No one will lose their job. No one will get seriously punished. As such, I fully expect the FBI and other law enforcement agencies to continue to come up with creative ways to perform unreasonable searches without probable cause.

<comment><USER23> No, the worst case is that people start suspecting innocent workmen of being undercover cops and enacting street justice against them. Now a meth dealer who's been awake for three days has a _legitimate_ reason to think that the cable guy might be a cop.

This is why Doctors Without Borders gets pissed off when the CIA poses as healthcare workers. This is why the Geneva Convention specifies that medical personnel - and _only_ medical personnel - wear a red cross to identify them as noncombatants. Someone at the FBI probably thought this was a grand idea, while utility workers are now more likely to be victims of violent crime because of it. Great job, guys.

<comment><USER24> Externalized costs are, like, totally someone else's problem, man.

</comment></comment></comment><comment><USER25> No.

I have followed this story for a while and this is just insane what they did without a warrant. So they effectively break the law to gain evidence? They are allowed to sabotage another party's services and pose as their persons to do such?

This is really just another in a long line of abuses the judicial system foists onto people, mostly onto those who cannot afford legal representation. Their mistake here was these people could. I am amazed they didn't try forfeiture laws and declare the computing equipment as breaking the law, without rights, and just taking it only "to discover" it was used for nefarious purposes.

</comment><comment><USER26> When Law Enforcement Agencies ignore the very law they are supposed to enforce they simply become a'put people into prisons' organization. This is the real reason why you don't want them to have wide reaching powers, there is only a fine line between LEA and criminal activity.

We will see if James Comey will shed as many tears about this as he is spending on Apple's encryption.

<comment><USER27> > the very law they are supposed to enforce

It doesn't seem all that clear cut that they were breaking the law in this case. What is illegal about them shutting off the internet and then posing as repair men? Is there actually a law against that?

<comment><USER28> >What is illegal about them shutting off the internet and then posing as repair men? Is there actually a law against that?

What do you think would happen if you tried that on the home (or office) of a law enforcement officer? I think you'd end up arrested and charged with something if you got caught; maybe destruction of properly, maybe fraud, maybe home invasion?

<comment><USER27> > maybe destruction of properly, maybe fraud, maybe home invasion

In this case, there was no destruction of property, just disconnection of internet service. As for fraud, I'm not aware of any fraud-related laws that apply. And it can't be home invasion if you invite me in.

</comment></comment></comment></comment><comment><USER29> This still doesn't top the fact cops all over this country on a regular basis, stop anyone and seize their property and cash without any charge of criminal wrongdoing, just because it would be too expensive for people to sue them to get it back.

That little gem should be running on the corner of the front page of every newspaper and television news program every week forever until someone is finally horrified.

<comment><USER30> > That little gem should be running on the corner of the front page of every > newspaper and television news program every week forever until someone is > finally horrified.

No, it needs to be the headline or top story, period. Running it in the corner every week relegates it to insignificance in pretty much anyone's eyes. Just as with the Snowden revelations, the constant bombardment of news stories will lead to information fatigue. People just won't care, and while they won't consciously accept it, their subconscious will add it to the ever-growing avalanche of shit they deal with on a daily basis. They will be come numb to it.

</comment></comment><comment><USER31> One thing also disturbing is that it doesn't say what they actually saw inside, and apparently that wasn't recorded.

This goes to show that, even if they _don 't_ see anything to justify a search warrant, merely letting them in allows them to _say_ they saw something in order to obtain a warrant.

Similarly, if you speak with police without a lawyer present, the policeman can _say_ that you confessed to them (or said something that damages your case, at least), regardless of whether it's true.

<comment><USER32> > _Similarly, if you speak with police without a lawyer present, the policeman > can say that you confessed to them (or said something that damages your > case, at least), regardless of whether it 's true._

I've always found that one really interesting. Let's say they arrest me, put me in a room and try to interrogate me for a few hours before a lawyer shows up. Even if the only words out of my mouth the entire time are "I would like to speak to a lawyer please", what stops the Police from saying I said something else entirely?

<comment><USER33> I know the answer to this. In 2014, the thing that keeps the police from saying anything else is a recording of the entire situation. Recording is standard practice in most interrogation situations. I say most, not all.

Story Time; I was interviewed for a crime I was tangentially related to (my employer at the time was robbed while I was on the clock, they were investigating any possible connections on my side). I kept repeating, "I would like to speak to my lawyer please." Once my lawyer came, he advised me to just be honest and tell them that there was no connection. I was just uncomfortable about talking to a cop behind closed doors and was 17.

When asked what we talked about, the cops response was something along the lines of, "nothing, the little asshole just kept saying lawyer. Check the tapes."

It was then that I realized the power of video.

<comment><USER34> The FBI recently changed its long-standing policy of not recording interrogations.

</comment></comment></comment></comment><comment><USER35> This comes just after the allegations that the FBI used the Seattle Times email format to trick a bomb threat suspect into clicking on a link that installed spyware.

If this plus the FBI impersonating respected Press members doesn't cause some kind of shake-up, I think we are doomed at every solving the problem of the law enforcement overreach.

<comment><USER36> That was legit, by contrast. In this case, if the butler had acceded to the initial request (to come inside to 'check the network') that would have been totally legitimate too. There's nothing legally wrong with tricking people, or undercover police work would be impossible.

<comment><USER35> Except it undermines the power of the press and, in my opinion, the freedom of the press, which is a constitutionally granted right. It creates a situation where people are scared of speaking to the press and can create situations where the press cannot get sources because of the fear of impersonation. So yeah, its good police work, except for that small little thing called the United States Constitution. This is all too often the reasoning that is used to take away our liberty.

<comment><USER36> I don't think it's unconstitutional at all. I gave the example the other day of where you have a suspect's phone number but no location. So you call and say 'I'm from Your_local_newspaper and we're offering 2 weeks of free delivery to new subscribers, would you like to receive the paper for 2 weeks free sir?' If the person say yes and you confirm the address, then deliver copies of the paper there and stake it out to see if your suspect appears to pick it up, there's no problem there.

I do not at all agree that this undermines the power of the press; one individual was sent a spoofed link that appeared to go to a newspaper story but didn't. This fact was in the public domain (accessible on the EFF's website) for 3 years before anyone chose to make a fuss about it. I certainly wouldn't feel inhibited about speaking to the press as a result of knowing about this.

<comment><USER35> It's not one incident that makes it scary. Its the fact that the FBI thinks its okay to continuously deteriorate long-standing constitutional protections because they know it'll help them catch more criminals. You know what also catches more criminals? Collecting every single American's technology information for the purpose of back-searching it in the event of a situation. The impersonating of press (which I completely disagree with your characterization of the event) is apparently standard protocol. By giving them the ability to steal their email format and letterhead style, they essentially have the ability to impersonate the press. Granted, in the publicized case, they only used it to act as a link to a news report about the suspect they were attempting to place malware on, but I don't think it is too far-fetched to see this line continuously move closer towards impersonation and further away from the clearly legal line.

</comment></comment></comment></comment></comment><comment><USER37> FBI is now an "organized crime" cartel. It is the Mafia.

This is not unlike the corruption at high levels in places like Russia, China etc. There, they have a grey zone between law enforcement and criminal organizations. Think of it as "regulatory capture" but in respect to law enforcement. Here there isn't as much of a grey zone (yet?), it is more isolated, but the acting above the law bit is the same.

You can look at it as both being a bad thin in an of itself but also a signal (proxy) for deeper and more serious issues coming down the pipeline.

The one thing that FBI has is better technology and resources than any of those other criminal organizations. So any corruption no matter how small will be amplified many times over.

</comment><comment><USER38> The FBI has been breaking the law and been guided by a machiavellian attitude for decades now. They are simply above the law and no oversight has ever been applied to this agency. Has there ever been a FBI agent sent to jail for subverting the legal system and breaking laws? Absolutely not.

<comment><USER39> The Federal Government has even thrown its weight around to protect agents when they're charged at the state level.

When Idaho attempted to indict Lon Horiuchi for shooting Vicki Weaver, the DOJ sent lawyers make sure that their man was shielded.

</comment></comment><comment><USER40> My story is only tangentially related, but pretty absurd. TL;DR - an FBI agent came to our house undercover as a FedEx driver, ready to serve a warrant as soon as we accepted a package.

When I was 16 I became an "eBay trade assistant" \- basically people who didn't know how to sell stuff on eBay would pay me a 15% commission to sell their stuff for them. The work was really trivial, but a lot of the people I sold stuff for were 70+ years old and had some great antiques. It was easy money for a 16-year-old.

One day a guy contacted me and said, "Hey, I have a GPS from my work that I don't need, and I want you to sell it for me." I looked up the GPS; it retailed at about $1500, and was selling for around $1,000 on eBay. I would literally copy/paste the official product description and earn $150 - a no- brainer. I told him to ship me the GPS.

A few days later, as my mom was about to take me to pick up my car from the mechanic, a FedEx guy came to our garage door. He asked if there was a "Scott Smith" that lived at our house (I don't remember the exact name). We said there wasn't. He said, "Oh, well I have a GPS here for Scott Smith." I said we were expecting a GPS, but that wasn't my name. My mom got nervous and turned down the package.

A few minutes later, as we were driving to the mechanic, my mom got pulled over by an unmarked car. It was a little strange to see an unmarked car in our small town, but oh well, my mom was speeding (as everybody always is in that town). I put my iPod headphones in and didn't think twice about it. The officer asked her to step out of the car (again, I didn't know enough to think twice). After about 10 minutes of them standing there and talking I finally pulled my headphones out and heard "stolen credit card" and "GPS" in the same sentence. I put together what had happened pretty quickly, and explained it to the officer. The officer made a circling motion in the air with his finger, and four of five other unmarked cars that had parked discreetly behind us on the street drove off in various directions.

Turns out I was being used as a "fence" for one of the largest credit card thieves in America, as he was testing the waters of using trade assistants to sell on eBay. My next-door-neighbor (and a good friend of the family), who was a police officer, later told me that they had been setting up this sting for weeks. He recognized the address as being close to him, but we lived next door to a trailer park that had been notorious for crime of all varieties, so he didn't realize it was actually our house they were targeting.

Turns out the FedEx guy was an undercover FBI agent, and they had a warrant to strip our house down to the studs if we had accepted the package. In the end, we just explained what happened, and I had to turn my beloved Hotmail account over to the FBI. They said they would have me testify in court if they ever caught the guy/girl responsible, and I've never heard anything. So either they never caught him/her or my testimony was unnecessary given the email transcripts.

My mom _loved_ to tell that story to girls I brought home for the first time. In retrospect it was probably a good litmus test to know if they'd be able to put up with me.

<comment><USER36> I don't see what's absurd about that - establishing probable cause and then doing a search with a warrant is exactly how things are supposed to work. I think it only seems weird to you because you were the least knowledgeable person about what was going on - the Feds knew there was a stolen goods ring in operation, the thieves knew you were a potential dupe who just wanted an easy buck, whereas you were young and inexperienced enough not to find anything odd about someone asking for your help in selling (what was then) a very high-tech item with a price to match.

<comment><USER32> You don't see any problem with Federal agents lying about who they are to further their own goals?

Why is it illegal for me to lie about who I am, but not the other way around?

<comment><USER41> I didn't know it was illegal to lie about who you are. There's lots of exceptions like "impersonating a police officer" and "identity theft", but I'm pretty sure it's not illegal for me to lie about who I am to a girl at a party to further my goals.

Also, the "Federal" part might be spooking you. How about police officers? Do you object to undercover officers?

<comment><USER32> > _but I 'm pretty sure it's not illegal for me to lie about who I am to a > girl at a party to further my goals._

Right. I was talking mostly about lying to the authorities. Why can they lie to us, but we can't lie to them?

> _How about police officers? Do you object to undercover officers?_

That's a good question - I don't understand how it works well enough. If my spouse is having a heart attack and I call 911, can an undercover cop pretending to be a paramedic come into my house and then can a search warrant then be granted based on what he saw in my house, even though I thought he was a paramedic not a cop?

<comment><USER42> > Why can they lie to us, but we can't lie to them?

While giving false statements (any statements!) to federal officers is illegal, it's not illegal otherwise. If you're arrested for selling drugs, claim you're not selling drugs, and then are convicted - the claim that you're not selling drugs is not a crime. You can't lie in court, but the authorities nominally can't either.

I think the fact that lying to a federal officer is a crime is absurd. However, only a small percentage of the population comes in contact with federal agents so the impact is lower.

>can an undercover cop pretending to be a paramedic come into my house

I think most states have laws making it a crime to impersonate an emergency responder, and generally courts won't admit evidence that is obtained illegally (fruit of a poisoned tree and all that). However, the fact that the person is a cop makes no difference. It's the same as if anyone showed up at your door claiming to be a paramedic.

</comment></comment></comment></comment></comment></comment><comment><USER43> I suppose that would depend on if I am allowed to invite repairmen into my home under the pretense that I have a broken utility and then shoot them for trespassing.

<comment><USER36> Given that it's not legal to shoot people for trespassing unless you have a reasonable expectation of harm, I suggest you don't test this theory. Trespass is a crime, but your response has to be proportionate to the harm you anticipate; so if someone is forcing their way into your house it's OK to shoot at them, but if they're just making a nuisance of themselves then you could march them off or call the police if you weren't able to do so.

Last month, for example, a Michigan man was sentenced to 17 years for shooting a drunk woman who came to his porch and banged on his door after crashing her vehicle. While it was reasonable for him to be nervous, the jury felt that fell far short of a justification for shooting the unwanted visitor: [http://www.nytimes.com/2014/09/04/us/theodore-wafer- sentence...](http://www.nytimes.com/2014/09/04/us/theodore-wafer-sentenced-in- killing-of-renisha-mcbride.html?_r=0)

<comment><USER44> > Given that it's not legal to shoot people for trespassing unless you have a > reasonable expectation of harm

That's actually quite dependent on state law.

Take California's: "Any person using force intended or likely to cause death or great bodily injury within his or her residence shall be presumed to have held a reasonable fear of imminent peril of death or great bodily injury to self, family, or a member of the household when that force is used against another person, not a member of the family or household, who unlawfully and forcibly enters or has unlawfully and forcibly entered the residence and the person using the force knew or had reason to believe that an unlawful and forcible entry occurred."

<comment><USER36> True, and actually the criminal status of trespass varies as well - it's usually a misdemeanor but is sometimes a felony, so my original comment was a bit vague. But the bit you quote encapsulates what I was saying about force.

People have got away with shooting others for merely approaching a dwelling (eg [http://en.wikipedia.org/wiki/Death_of_Yoshihiro_Hattori](http://en.wikipedia.org/wiki/Death_of_Yoshihiro_Hattori)) but attitudes about this seem to be shifting, so if you do feel impelled to shoot someone I would suggest calling the police immediately rather than relying on presumptive justifications.

<comment><USER44> > but attitudes about this seem to be shifting

Quite thankfully so.

I don't disagree really with anything you said -- just wanted to note that state laws aren't consistent on this, and in many cases aren't fully clear at a glance.

</comment></comment></comment></comment></comment><comment> at-fates-hands I'm all for rooting out criminals, but someone needs to start telling these people you need to do it within the guidelines of the law.

The funny thing is they could've easily written up a warrant and had it signed by a judge in the span of an hour and then properly searched the room. Instead, In their haste, they violated several local laws including the fourth amendment, which most judges don't look kindly on.

Not a good day for law enforcement.

<comment><USER45> I heard the story on the radio this morning and believe I recall hearing that the agents only suspected certain illegal activities were taking place in the room and did not yet have enough information to actually get a warrant. This tactic was employed to enter the room, survey the environment, and gather information that they then used as the basis of a warrant. Also, they did not mention in the warrant request specifically how they obtained the information (by cutting services and entering the room via that approach).

I am not making an opinion on the matter either way, just adding context that I heard from the story.

<comment><USER30> Sounds like fruit of the poisoned tree to me. Their probable cause was obtained in an unlawful manner. A police officer (federal or not) cannot enter a premises under bad faith to gather evidence. Any evidence obtained in that manner can't be used against the defendant, nor can it be used to get a warrant.

I worked in law enforcement alongside detectives for 14 years, and they were always very careful about probable cause and evidence gathering, because they knew the risks to the case they were building if they didn't do everything on the up and up.

Why the FBI wants to risk blowing what is obviously a very important case using illegal evidence gathering techniques is puzzling. The fact that the Justice Department is apparently in on it is even more mind-blowing.

<comment><USER36> Tengentially related, you'll probably find this case interesting - the police didn't break the law but it's one of those corder cases that's ethically very troubling: [http://scholar.google.com/scholar_case?q=mcgacken&hl=en&as_s...](http://scholar.google.com/scholar_case?q=mcgacken&hl=en&as_sdt=2006&case=10492252643531776814&scilh=0)

I don't mean to suggest that the police officer here was unethical; it's a structural fault in the law itself.

<comment><USER30> This is something that happens a lot in television and movies (Cop 1: "Did you hear screaming behind the door?" Cop 2: "No I....oh yeah, _someone must be in DANGER!_ " Cops kick in door and see evidence for their case), but not so much in reality.

I too find it troubling that the Supreme Court upheld the government's position that it was a valid search.

<comment><USER36> I actually think the search was valid (and remember McGacken consented, which was a public-spirited action). What bothers me is that in establishing that a potentially serious crime had not taken place, a victimless one resulted in a pirson term. McGacken did the morally right thing in allowing the police officer to verify that nobody was in danger, and while I can't really fault the police officer for doing his job, I wish he had looked the other way.

What really bothers me about it is that I can't articulate a clear legal principle about when _prima facie_ evidence of a crime should be thrown out for moral reasons. You could say that if you're investigating one crime then discovering another one incidentally shouldn't count, but what if the police officer had been investigating a report of illegal marijuana production and had discovered the rape in progress? Of course we'd want that to be prosecutable. We could wish that the war on drugs were over and nobody would be prosecuted for Marijuana, but I can think of other petty crimes that would substitute equally well, eg if McGacken was a petty thief or something. It's a really tricky case to me. I'm surprised nobody has examined it in a law review article.

<comment><USER46> It seems like we could establish some hierarchy (in fact, we already have one implicit in maximum or minimum sentence lengths, though I don't know if that is the right one to use). When an officer asks to engage in a search, he can then state "I am investigating X, we will ignore anything less serious."

If something is seen, it seems like it would be hard to prevent the officer from making a mental note to look into that guy later. We could grant immunity, but that could also get weird. I think just narrowly excluding the evidence uncovered in the search would still probably be an improvement, though (probably...).

</comment></comment></comment></comment></comment></comment></comment><comment><USER36> I hope this turns out to be compliant with Betteridge's law, and I think it will. In a different thread yesterday I pointed out that deception is a reasonable and legally acceptable aspect of law enforcement, but that stops where the penal code starts. Cutting off communications services to the building as a pretext to gain entry seems like a clear violation of law, and (IMHO/NAL) should render all the evidence gained pusuant to the search warrant inadmissible as 'fruit of the poisonous tree,' because the probable cause offered for issuance of the warrant was defective.

</comment><comment><USER47> This is so fucking crooked that only the government could make an argument that its legal.

</comment><comment><USER48> As hard as it is to believe, in all my encounters with the police over the past few years, they have been courteous and professional, and, as far as I can tell, completely honest. Go figure.

</comment><comment><USER49> This is a tricky situation. Can this be done or not depends mainly on the gravity of the crime being investigated. If it's about someone's life in danger, I can get behind such a move by FBI, but to get evidence against gambling I don't think such an extreme move is necessary.

<comment><USER50> How certain do you need to be that someone's life is in danger? This is why we have a judicial process to get warrants.

<comment><USER46> [http://en.wikipedia.org/wiki/Exigent_circumstance_in_United_...](http://en.wikipedia.org/wiki/Exigent_circumstance_in_United_States_law)

</comment></comment></comment><comment><USER51> This will be tossed out at the district magistrate prior to trial due to Fourth Amendment violations. The amendment does exist, and still has quite a bit of force of law in traditional criminal prosecutions.

</comment><comment><USER52> The only legally relevant part of this story isn't discussed in the article: did the occupants of the hotel room consent to have the agents enter the room, or didn't they? This is the only thing that will matter in court. If they did, then it doesn't matter that the cops employed a ruse. The police use ruses and tricks all the time. You could argue that it wasn't within their rights to sever the internet connection in the first place, but you'd have to contend with several arguments there, such as internet being or not being a utility, or the operators of the hotel having the unilateral right to cut it off if they wanted to.

<comment><USER11> Can you cite anything to support this? I find it hard to believe that a court would completely ignore the basis on which consent was given. For example:

 _" The Fourth and Fourteenth Amendments of the United States Constitution require that a consent to a search not be coerced, by explicit or implicit means, by implied threat or covert force. For, no matter how subtly the coercion was applied, the resulting "consent" would be no more than a pretext for the unjustified police intrusion against which the Fourth Amendment is directed"_ [1]

...which seems to indicate that the same notion of "fruit of the poisonous" tree as regards evidence applies equally to consent to search.

[1] Schneckloth v. Bustamonte, 412 U.S. 218 (U.S. 1973)

<comment><USER52> I don't have the cite on me but there's a 1970 case in California where the cops knocked on the door, the occupant of the house told them to come in, they came in and arrested everybody (no warrant). Court found for the people.

Anyway I'm not even saying that the FBI will definitely prevail here. I am saying that the whole thing will hinge on the question of consent. Your rebuttal seems spurious because you cannot have been coerced by someone if you thought they were the cable repairman. That's incompatible with the rest of the defense.

<comment><USER53> I had a weird conversation with a cop last year - basically, they responded very late to a domestic disturbance, that being, one of the people staying in my spare room until they got their shit together decided to attack me. The other person called the cops while I calmed the first person down, which fortunately happened before the cops showed up.

I answer the door, and am asked if everything is okay, and so on. I probably look very shaken because I had to disarm someone not 5 minutes earlier, so they insist on coming in. What I told them is that they put me in a bind, because on one hand, I was told that it is customary in the US to refuse entry to law enforcement unless you specifically called them, on the other hand, I have taken a vow of hospitality, so they are welcome to a warm meal, but would they mind having it served on the porch?

They saw some Jehova's Witness literature on a table behind me and figured I was some religious crazy, said they're not allowed to accept food on duty but thanks anyway, and left.

All this because the person who tried to stab me is transgendered, and I didn't think spending any time in a jail would have been safe for her.

Sorry for the irrelevant story, I just had to let it out.

</comment></comment></comment></comment><comment><USER54> Well, they obviously can.

Whether or not they _should_ , OTOH...

</comment><comment><USER55> No, they can't. This is an incendiary set of facts - but most certainly won't be upheld in any reasonable court.</comment>


Medieval Iceland and the Absence of Government - <AUTHOR> http://mises.org/daily/1121 <comment><USER2> The David Friedman cited here is the son of Nobel laureate Milton Friedman, and the father of Patri Friedman (former Google engineer, now director of the Peter Thiel-funded Seasteading Institute: <http://seasteading.org/>).

His book _The Machinery of Freedom_ has a lot more about law without government, both historically and speculatively: [http://www.amazon.com/Machinery-Freedom-Guide-Radical- Capita...](http://www.amazon.com/Machinery-Freedom-Guide-Radical- Capitalism/dp/0812690699)

His weblog is pretty good reading for HN fans too: <http://daviddfriedman.blogspot.com/>

<comment><USER3> The Machinery of Freedom is a great book. One of the few capitalist-Anarchist tomes __not __in the Austrian tradition, and much more convincingly argued than most.

Sadly, it is little known or read. I asked David about putting the text online since sales are so small, but the publisher still owns the rights to it.

Sometimes I think, what would the world be like without the Friedmans? Definitely a grayer, less free and dynamic place.

</comment></comment><comment><USER4> According to "Viking Age Iceland" the Icelanders mostly settled disputed by tit-for-tat revenge killing of each others' slaves. It was all really grim.

[http://www.amazon.com/Viking-Age-Iceland-Penguin- History/dp/...](http://www.amazon.com/Viking-Age-Iceland-Penguin- History/dp/0140291156)

<comment><USER5> You're probably talking about Njal's Saga. There is a feud that degenerates into exactly that--but it is also clear if you read the story that this is not the normal way disputes get settled. We got a saga out of it precisely because the standard process broke down in spectacular fashion.

You should be able to find a copy of Njal's Saga pretty easily. I recommend reading it for yourself--even apart from the historical/political value, it's just a good story.

<comment><USER6> Sorry for coming in late when no one reads anymore, but...

Clan societies (that is, most everywhere, before state monopolies on violence) had this kind of revenge for generations. Afghanistan and parts of Iraq are famous present examples.

Afaik (no references, but I think Wikipedia supports this), the research says that old Scandinavia's local ting was a bit more of a negotiating place for feuds than a governing/judging assembly.

Edit: Life on Iceland was certainly even harder than in the rest of Scandinavia. That would probably have left less time over for that time's main sports -- pillage, etc.

<comment><USER5> I'm not sure if you're disagreeing with me or not.

Medieval Iceland was a violent place, and the _threat_ of violence was much more overt than it is now. But it was not a society where disputes were _primarily_ settled by killing.

> the research says that old Scandinavia's local ting was a bit more of a > negotiating place for feuds than a governing/judging assembly.

It was a place to negotiate disputes (which sometimes ended up as feuds). It was a place to recite the (complex and sophisticated) law code of the saga period Icelanders. It was also a place to show off your prosperity and the quality of your alliances.

I have to reiterate. If you are at all interested in this stuff, read a saga for yourself. Whatever else you end up concluding, you'll get over the idea that these people were a bunch of doltish brutes.

> Life on Iceland was certainly even harder than in the rest of Scandinavia.

I'm not sure why you're certain of that. Iceland was settled by Scandinavians after all. People don't usually emigrate to a place where life is harder than where they started.

> That would probably have left less time over for that time's main sports -- > pillage, etc.

Several times in the sagas you read of young men going off to raid and plunder, sometimes coming back to settle down at the farmstead. They pillaged, just not each other.

<comment><USER6> a. You do know how clan societies work?

b. Check climate data; Iceland was (and is) a hard place for farming, etc. Check population density and add that to that until quite recently, Malthus' description of human deaths/births ruled (the "Essay on the Principle of Population" in itself also answers your theory that people don't generally emigrate to places where life is harder).

</comment></comment></comment></comment></comment><comment><USER7> I don't know if I'd call this an "absence" of government, just an example of a relatively minimal government. There was a hierarchy of some kind here, and a concept of laws. What looks remarkably different to us today is that it lacked a massive bureaucracy.

</comment><comment><USER8> Two points:

The population of medieval iceland never exceeded 80,000.

The country was Catholic, there was plenty of church law.

<comment><USER9> Yup. It's the size of, say, a Greek city-state, or a large-ish rock concert.

Radically open (or otherwise atypical) government structures are much more feasible at that kind of scale.

<comment><USER10> Source?

I've seen this claim a few times, but never a study on it.

<comment><USER9> Have you ever seen one that worked at a larger scale than that? Bigger systems require more layers of organization: there are more places for disagreements to crop up, and resolving them is a bigger and harder problem. Disagreements about the fundamental defining purposes of an institution multiply, and these conflicts need to be resolved somehow. Everyone needs these definitions to be mostly compatible for institutions to function, and this just isn't feasible without some structure at larger size. At the size of a single family, it can work pretty well – doesn't usually, but I know some families that are shockingly egalitarian. There also exist small companies, university academic departments, primary schools, research labs, etc. which are culturally uniform and cohesive enough for this to work. Even at the size of a city, I think it's mostly impossible: the best we can hope for is widely supported representatives who operate transparently and are accountable for their actions.

Iceland is a pretty unique case: everyone there is pretty much everyone else's cousin, and they're on an island. They look the same, have roughly the same beliefs, etc. etc. And I'm still far from convinced that medieval Iceland was really so utopic.

I'm thinking of Sparta though, which was by many accounts pretty culturally uniform and egalitarian/meritocratic, at least for citizens.

* * *

I think the best analysis I know is still Tocqueville's _Democracy in America_. I also recommend _The Federalist Papers_ , particularly Nos. 10 and 51, for a pragmatic solution to these kinds of problems, based on the decades of first-hand experience some smart blokes like Madison and Jefferson had trying to run fledgling democratic states. (And Machiavelli's _Discourses on Livy_ is probably worth a read too.)

For a more literary exploration, read some Balzac novels: early 19th century France was the beginning of the cross-over from aristocracy to bourgeoisie, and rapidly growing cities quickly accumulated bureaucracies.

<comment><USER11> Have you ever seen a working liberal democracy before US? :) That kind of argument doesn't work for proving impossibility.

Life without violence from government (taxes) is certainly possible. In 19th century US government spendings were only 2% from GDP. Such amount can be collected with charity without force.

<comment><USER12> Of course, in the 19th century the continental US wasn't densely settled and shooting the natives was considered reasonable under many circumstances. Get real, any country in the world that found itself with vast tracts of fertile land more or less free for the taking would have a fabulous GDP - budget ratio too.

</comment></comment></comment></comment></comment></comment><comment><USER13> >In a stateless society, men are selected according to their ability. Status, money, power, and greed, everything that the advocates for a strong central government stand for are not prerequisites for leaders

I was unable to make any sense of this, or the rest of the final paragraph. Surely having money and power could help you to get a position of authority in a stateless society. E.g. by advertising, bribing, spending the money on popular philanthropic projects, etc. etc. The possibilities are endless.

(In fact, isn't it almost tautologically false to claim that power is "not a prerequisite" for being a leader? Leaders have power virtually by definition.)

And as far as "men" being selected based on their ability, why on earth should abolishing the state suddenly give everyone perfect judgement?

<comment><USER10> Check the wording carefully...by saying they are "not prerequisites" this does not mean having money can't help you.

It's a matter of degree. With a powerful state people are more likely to obtain positions of power due to favors, or who they know rather than merit. The reason being that if you're a government official and you hire the senator's son over a more qualified candidate (to gain his favor) it's not as big of a deal if he screws up because it's not your money he is losing (it's the tax payers).

In a free society you're more likely to hire the best person for the job because it's your own money on the line if he screws up.

As Milton Friedman once so elegantly put it, you always spend your own money more carefully than you spend someone else's. And this can be a powerful incentive.

<comment><USER12> _The reason being that if you're a government official and you hire the senator's son over a more qualified candidate (to gain his favor) it's not as big of a deal if he screws up because it's not your money he is losing (it's the tax payers)_

You must hate most corporations then - all-powerful executive, weak and passive boards of directors, and shareholders with little influence who have to take the haircut for executive screwups.

Why is it that most of the institutions of capitalism have such hierarchical structures? Seen any anarchist corporations on the stock ticker lately? No? Maybe that's because when laissez-faire capitalists start talking about freedom, they're talking about what they want for themselves, not everyone else. As Adam Smith observed, men of the same profession seldom come together save with the intent to defraud the public.

<comment> barry-cotter Yeah, but shareholders in corporations have a much more credible threat of exit. The more people exercise said right the more the price falls, and eventually the management is replaced.

</comment></comment></comment></comment><comment><USER14> The article mentions several times that the Icelandic form of government lasted longer than the US - if anything I see that as a negative indicator, given how little actual progress occurred during that time. Compare the impact the US system of government has had with the impact the Icelandic form cited in this article had. The indigenous populations of North America and Australia have been around for thousands of years as well, with their "chieftain" systems of government, and similarly they just stagnated.

<comment><USER15> > _Compare the impact the US system of government has had with the impact the > Icelandic form cited in this article had. The indigenous populations of > North America and Australia have been around for thousands of years as well, > with their "chieftain" systems of government, and similarly they just > stagnated._

You really ought to check out _Guns, Germs, and Steel_ by Jared Diamond. [http://en.wikipedia.org/wiki/Guns,_Germs,_and_Steel#The_theo...](http://en.wikipedia.org/wiki/Guns,_Germs,_and_Steel#The_theory_outlined)

Specifically, he would question your use of the word _stagnate_.

<comment><USER14> I've read it, and I think it's silly to ascribe societal success based on the various random incedental facotrs surrounding it.

<comment><USER15> I don't see where randomness comes into his explanation. Rather, I see his explanation for technological success as hinging on massive societies which specialize, which is in turn based on highly developed domestic agriculture, which is in turn based on the East-West axis of Eurasia with origins in the Fertile Crescent and East Asia.

</comment></comment></comment></comment><comment><USER16> Interestingly, this reminds me of the distributed cultural nation-states based on interests as described in _The Diamond Age_. The idea of non-location-based national affiliation has interested me since I read about that, and though I've read some about old Iceland's political system, I never knew they had such a thing.

<comment><USER17> > the idea of non-location-based national affiliation has interested me

Interests me too. There's got to easily be at least 10 million, 20 million people who think the way I think, but we're all spread out and surrounded by hundreds of millions of people who want to force us to do their bidding, impose their morals on us by force, and so on. Individually we couldn't stand up against a horde, but if we could become part of the same recognized affiliation and negotiate and work together voluntarily - that'd be something.

</comment></comment><comment><USER18> Fantastic find, thanks for sharing!

While I am now very interested in learning more about Medieval Iceland and it's government, I do wonder if some type of "federal" authority would have prevented it's demise?

Now, I am not in favor of the current heavy federal government and its power over the states here in the U.S. I think the balance between Medieval Iceland and the U.S. is to shift power back to our 50 states, and have our federal government there to do what it was originally intended: prevent what was the demise of Medieval Iceland.

Hopefully that made sense.

<comment><AUTHOR> Its demise was the introduction of the involuntary church tithe which forced the free farmers to pay the chieftain. This create a capture audience, allow cheftains to concentrate their power, and create a less competitive market for law and abritation.

A "federal" authority would concentrate and centralize power and create the same situation exactly the opposite of what we want.

<comment><USER18> Thanks for that clarity and helping me arrive to that answer more quickly. I would have eventually got there when I started loading information about this history tonight.

Intriguing that this history isn't referenced more often.</comment></comment></comment>


How to flash an LED: writing ARM assembly for an STM32 microcontroller - <AUTHOR> https://mcla.ug/blog/how-to-flash-an-led.html <comment><USER4> I have years of experience in asm programming with PIC processors, and my job is embedded software development. I got an STM32 development board a couple years ago to get my feet wet in ARM embedded development. I got completely bogged-down in setting up the development environment. It took me forever to get a blinking LED, and I spent an ungodly amount of time unsuccessfully trying to figure out how to change the rate based on a potentiometer input.

It was a very frustrating experience, but articles like this make me want to dive in and try again!

<comment><USER5> Do you mean in assembly? If you just mean C, then if you're already in embedded then I'd say a few years ago it was easy. These days it's super easy - tools like STM32CubeMX will allow you to get even custom hardware up and running in no time.

It will even spit out multiple project types - everything from ARM Keil/MDK/uVision to just a simple makefile.

<comment><USER6> I disagree that GUI tools like STM32CubeMX are useful. They end up being a crutch that end up adding increasingly complex wizard driven autogeneration, rather than just exposing the configuration in easy to consume ways. Sure, you can get something running fast, but it's incredibly difficult to move from "blink a led via this template project" to "build a useful project integrating multiple peripherals".

I think there's some actually interesting work being done with standardization like SVD files, but too many vendors treat them like second class citizens compared to their bulky code gen solutions.

<comment><USER5> I think it's decent - configuring a clock tree and initialising the peripherals by hand might be a good way to learn the chip but in terms of rapid prototyping I'll take the GUI driven leg up any day.

</comment></comment></comment></comment><comment><USER7> @author:

       1     @ Set BR8 field in GPIOA_BSRR, to clear GPIOA8
       2     movw r1, #0x0000
       3     movt r1, #0x0100

you can just use a mov to get that value. Any 8-bit value shifted left any number of bits is synthesizable using one MOV

<comment><AUTHOR> This is true! If I was writing something to be optimal speed- and size-wise, I'd do that. I think I just liked the consistency with the other parts of the code where using both was necessary :)

<comment><AUTHOR> Oh actually I was being sleepy and hadn't understood what you'd said! I hadn't realised you could do that actually, neat, thanks!

So you could do `mov r1, #0x01000000` right? nice.

<comment><USER7> yup, some other constants are also loadable in one instr, of the form 0xXX00XX00, 0x00XX00XX, 0xXXXXXXXX where XX is any byte

<comment><USER8> Do you not need the usual LSL, or does the assembler take care of that?

<comment><USER7> it does, yes

</comment></comment></comment></comment></comment></comment><comment><USER9> I did something similar with CMake and a lot of the details are incredibly challenging to piece together. Everyone just blindly copies existing linker/startup scripts. Very low level articles like this are rare and invaluable

I spent a month and got things working with a modern toolchain C/CMake/GCC/OpenOCD but gave up on further work bc I couldn't nail down a lot of details. micro programming outside arduino is painful and backward. it's stuck in the 90s

[https://geokon-gh.github.io/bluepill/](https://geokon-gh.github.io/bluepill/)

</comment><comment><USER10> This was a really interesting article, and I learned a lot. I'm very much lacking in chip/assembly level knowledge, and this helped me to understand a little bit more. Thank you, Lochsh, for writing it!

<comment><AUTHOR> This is lovely to hear, I'm so glad it was helpful!

<comment><USER11> Not too familiar with the content of your post, but...I love your site design - great use of space, color & serif fonts!

<comment><AUTHOR> I love getting compliments on my site design, thanks very much.

</comment></comment></comment></comment><comment><USER12> Fantastic article, thanks for taking the time to write it up! I'm trying to learn about embedded systems at the moment and it feela like a super steep learning curve, really appreciate your post breaking everything down.

A little typo I think I spotted: ' So, to turn on our LED we want to set the BR8 field, and to turn it off, we want to set the BS8 field.'

Should this be: ' So, to turn on our LED we want to _clear_ the BR8 field, and to turn it off, we want to set the BS8 field. '

<comment><AUTHOR> Thank you for the compliment ^_^ I'm glad you found the post helpful.

This isn't a typo, actually. If you look at the documentation of the BSRR register (which is screenshotted in the blog post), it says of BRy:

> These bits are write-only [...] [Setting to 1] Resets the corresponding ODRx > bit

So setting BR8 in the BSRR clears the ORD8 bit in the output data register. Because our LED is active low, this turns the LED on.

The indirection can make this a little confusing, I hope this cleans it up!

<comment><USER12> Ahh I see now, thank you for teaching me. My mistake!

Do you happen to know of any great learning resources, basically more posts like you've written that go into lots of details and explain why things are done?

Thanks again!

<comment><AUTHOR> I'm not sure I do have suggestions for such resources sadly :( If anyone has any please drop them here!

</comment></comment></comment></comment><comment><USER13> Anybody got USB communication (CDC class) working on this platform without the proprietary libs?

<comment><USER7> no, i spent months on this, and the answer is no

They use IP from synopsis, but <rumor>synopsis refuses to allow their docs to be published so every manufacturer has to read them and regurgitate them into their own docs in their own words</rumor>. In any case official STM docs are incomplete. See their driver source - it accesses undocumented registers and sets undocumented bits in documented regs. Without them the usb core will not start or run.

Your options are to carefully rewrite STM's libs (which are based on real synopsis docs and DO work) or use them as is. Both solutions IMHO leave you subject to STM's EULA and such

this is the #1 issue in stm32

a close #2 is the their so-smart-it-is-useless i2c controller. I know of no project that uses it. Everyone bitbangs i2c master on stm32. The hardware unit is very easy to wedge to a point where only a power cycle unwedges it.

<comment><USER14> Avoid ST at all costs in my experience. Their documentation is terrible. They never acknowledge hardware errata even after clear evidence of it. They're not a company with a solid engineering culture imo

<comment><USER15> I'm really surprised to hear that. ST has always been one of my favorite manufacturers. I find their datasheets to be clear and well laid out, though I will note that I'm usually more interested in the hardware side than the software side. Their chips and boards are also high quality and convenient, e.g. GPIOs are often five-volt tolerant, Nucleo boards come with well-made breakout headers and several peripherals (at seemingly impossibly low cost), chips have wide supply voltages, etc. I can't say I know anything about their errata (I've never run into any), but even if the situation is as bad as you say, that's quite a harsh condemnation, especially considering how widely-used and successful they are in industry. Do you have other complaints?

<comment><USER14> I've used their accelerometer (LIS2D). Performance and specs are great - <USER2> was just a pain to develop the embedded interface with it because the documentation had a bunch of mistatements and was missing critical information (a weak pullup on a certain line caused a bunch of current consumption - <USER3> days to figure out). Also they had an off by one bug in their LIFO queue that took a long time to figure out. Once you getting it working its great. Last time I checked they still hadnt updated their documentation with what I reported to them...

</comment></comment></comment></comment></comment><comment><USER16> Is there a better way to sleep/delay other than what basically seems like 100% CPU usage in a subtraction loop?

<comment><USER17> The other approach to delay's (keep in mind, that there is no other process to yield the CPU too) is to use a timer (a peripheral of the micro controller).

This would take a fair bit more code to configure the timer, and setup an interrupt to handle the timer.

<comment><USER16> How do multiple processes usually 'share' a timer?

<comment><USER17> Microcontrollers (assuming no RTOS in use), typically don't have multiple processes, they have the main thread of execution (which in the article is the entire program) and have interrupt routines that a run in response to an external event (in this case, the timer has expired).

Using the interrupt driven approach, can led to better performance both in CPU time (async communication with slower periphials etc) and battery life (sleep states).</comment></comment></comment></comment>