111 karma · joined April 26, 2012
imo the analogy would be like to eg https://www.macrumors.com/roundup/iphone-17-pro/ what you are presenting is "when was this last released" as opposed to a forward looking "should you buy this now"
but even thats not true because you are considering future stuff, so maybe its jus the framing of "done" vs "should i get into it now" not being the same thing when the definition of done is more stuff is coming
i love the recommendation engine though!!! make it more prominent!
With AR queries you can do the same and make it linear in ruby (and then the computer doesn't really care if your sql is nested)
last_three_posts = Post.limit(3).order(created_at: :desc)
@posts = Comment.where(post_id: last_three_posts)If you can count in the database itself it's a big win. Although no doubt your solution is cleaner code.
(Also I think the above sql needs to be tweaked since you need the votes count grouped by comment not by post)
A one to many relationship in pure SQL is an awkward fit with a Rails app as it requires serializing (at least) the many as json. Then there's this weird conceptual gotcha where one resource is an AR instance and another is a pure hash.
I'd probably make a scope and association to help out here:
class Comment
scope :with_vote_count, ->{ joins(:votes).select('comments.*').select('count(votes.*) as vote_count') }
end
class Post
has_many :comments
has_many :comments_with_vote_counts, ->{ with_vote_counts }, class_name: 'Comment'
end
# in controller
@posts = Post.includes(:comments_with_vote_counts).limit(3).order(:created_at: :desc)
# in view/serializer, posts and comments are both AR instances
@posts.each do |post|
post.comments.each do |comment|
comment.vote_count # => Integer
end
end
This should give you 2 queries, one to load the posts, then one to load the comments and vote counts for the relevant posts. Controller stays nice and slim and the complexity is delegated to sql via the join scope, without any other dependencies.* edited for HN code block syntax
Ukraine gets the Donbas back in return for international recognition of Crimea as Russian territory.
Fanciful, I know. And questionable whether Article 8 would hold up. But advantages:
1. End to the conflict 2. Security guarantees for all of Europe 3. Repurposing of NATO from anti Russia alliance to anti China alliance, ie pivot to Asia
Russia is on the offensive when viewing this conflict in isolation. Zoom out to geopolitics and it is very much on the defensive.
They are locked in this conflict and if they cannot achieve their goals they will escalate. They also own the most nuclear weapons of any country on earth.
This is what the Art of War says when it says not to put enemies in a corner.
This is also a very realpolitik take on this. It goes without saying that all of this is a humanitarian disaster.
Sorry to say, autocrats do not withdraw from a conflict like this regardless of attrition. Their power is their legitimacy and defeat is a threat to both their rule and probably their life. I mean look at how much flak Biden took withdrawing from Afghanistan despite being able to say that it was a horrible idea and someone else's fault.
This is a little different from Afghanistan and Iraq though, Russia's security concerns are valid and probably ameliorated by Ukraine as a failed state (as opposed to a NATO aligned state) so conquering and pacifying the country is not necessary.
The only real humanitarian solution is a diplomatic solution. I wonder if written guarantees that Ukraine and Georgia will never join NATO would be enough now honestly.
As far as I know, there's no reason it couldn't be "Log in to see this profile".
I believe the injunction bars LinkedIn from blocking hiQ specifically from accessing the publicly available information (which again is public by LinkedIn's choice). They made a point to draw a distinction between the public stuff and stuff behind a login/password.
The only reason the data is public is for marketing purposes, to sign up more users.
The same 9th circuit who held last year that LinkedIn could not block hiQ from scraping public data, just got asked to reconsider the same case, except now there is additional precedent that SCOTUS says if you had permission to access the computer then it's not a violation of the CFAA (even if you are a shady corrupt cop).
Hard to see this turning out any other way than the 9th circuit reaffirming their decision (or even strengthening it) and then it's up to LinkedIn to try SCOTUS again
i actually agree that corporations have too much power versus individuals in society. but it's a bit much to jump into the gorilla exhibit and then write a clickbait post about whether it was unethical.
im not saying any of this is illegal. just weird to copy your previous employer's tech stack, open source it, and try to play the victim and clickbait HN.
ianal but absent some nda seems like it's probably legal for him to do it.
it just seems like kind of a dick move. i could mentor new engineers, wait until someone told me about a really cool idea, then steal it from them and build it myself. there's no law against it, it's just is kind of a dick move and seems kind of wrong.
as noted above, ceo is acting like a dick as well. but i think the way this dude is trying to play the victim through clickbaiting HN is a bit much. just my opinion.
this case: build literally anything else except for the thing that he paid you to learn how it works.
either you believe that people should act ethically even if that means forgoing actions that they are legally allowed to make. if you believe that, isn't it wrong to build a free, open source competitor using all the knowledge you just got from working inside a company?
or:
you believe that business is the law of the jungle, and everyone is free to do whatever they can get away with legally. in which case why is it a problem for amasad to get lawyers involved?
it seems this dude's victimization relies on holding amasad to a higher standard of ethics than he holds himself. maybe he should because he has more money and power. or maybe not?
and i see your point, he seems to be within his rights to do this. even if i would be pretty irritated if someone ripped off my idea after working with me, it's problematic if he is being bullied from doing so.
i don't know how that extends to ethics though, which seems to be the theme of his post. either there's a moral code and i think he's shading the wrong side, or its the law of the jungle and then the ceo is free to use a lawsuit to stop him.
i think it's just the general sense of thirst and drama that i get from his blog and emails that make me think he's really after the publicity instead. which he has accomplished.
pretty petty decision to threaten to sue your former intern for his weird move.
also, threatening someone with money is a pretty surefire way to look like an asshole.
similarly petty decision to spend hours documenting everything to post on HN and start throwing mud in public.
everyone seems well within their legal rights but ethically seems like there were a lot of off-ramps for someone to be the bigger person and none were taken.
That said, doesn't this pretty much include anything on the web?
(a)Whoever— (2)intentionally accesses a computer without authorization or exceeds authorized access, and thereby obtains— (C)information from any protected computer;
where a "protected computer" is:
(e)As used in this section— (2) the term “protected computer” means a computer— (B) which is used in or affecting interstate or foreign commerce or communication
seems like that would catch an awful lot of webservers.
There are many other laws that you can still be charged with that govern what you access, irrespective of how, ie copyright, child porn, confidential information.
The people who view this as a win are worried that if "authorization" is defined as "against any rule, made by anyone" then the CFAA could be used to criminalize almost anything online. Note that restriction of the CFAA does not let you off the hook of other laws.
The people who worry about this are worried that judges had to use a fair bit of extrapolation and guessing as to the intent and effects of the law because the wording is pretty vague, and probably problematic for internet activity if interpreted very narrowly.
The CFAA is a law about how access is attained not what is accessed. There may or may not be other laws that have penalties for what is accessed given the nature of what is accessed, but that is a separate issue from the CFAA.
For example, I am sure that there is some statue I would be in violation of for walking out of a CIA office with a binder of classified information. This should be illegal regardless of how it's accomplished.
By contrast I think it should probably be a crime to gain access to a system through either technical exploits or social engineering, even if all you do is access cat memes that were public anyway.
Layered on these issues is whether you think judges should stick to literal textual interpretations or rule based on the projected impacts of their decisions.
Personally, as many have laid out, a strict textual approach opens the door to let private companies write felony law for literally anything they want, which seems an unworkable way to run a society.
I think it's much more prudent to restrict this law to methods of access and allow other laws dictate what can and can't be accessed or used (copyright law, state secrets etc).
A final question is how to test for whether methods are authorized or not. Someone here suggested the test should be the inclusion of "material deception". This I think falls short because a lot of behavior that we would not want to criminalize would satisfy the test. Should it be illegal to use a VPN? Because I can see that being construed as material deception. Sacha Baron Cohen dressed up as Borat is unquestionable material deception but I don't think it should be illegal for him to use a computer when doing so.
Ultimately I don't know that there is a bright line definition, but that's okay because we use a "reasonable person" standard a lot in law, (and we should seek to seat judges that are the most reasonable of us).
- No reasonable person would impersonate another to customer service to steal their phone and thus password. - A reasonable person might want to use a VPN to avoid being tracked by private corporations. - No reasonable person would exploit a zero day bug on a major corporation. - A reasonable person might change their user agent to see how a site looks on a phone. - A reasonable person might look up and save articles from a database they have access to.
The government has actually taken steps to push us down that road by mandating that all generation is renewable by 2045. Of course that's easy to say and harder to do, but I'm not sure it should be up to the government on how we get there.
The entity with the most responsibility to get there is HECO, which has a bit of a mixed record.
On one hand they have been pretty good about encouraging customer generation with net metering, and later grid supply options. Unfortunately there is a bit of an engineering problem there as we have pretty much reached the saturation of customer solar such that in the middle of cold sunny days, there is more electricity being produced than consumed (see duck/nessie curve). This would sound like a good thing, but with an extremely old grid and no utility level storage, it's kind of not.
A more reactive utility perhaps would have done a better job upgrading the grid to allow for distributed generation, but HECO spent the better part of the last 5 years trying to get themselves sold to a mainland utility to drive returns to shareholders instead of placing institutional focus on solving current or future problems for ratepayers. Serving two masters, etc.
Kauai has a much more interesting situation as their utility went through that whole sale to the mainland thing in the 90's, which failed and provided the opportunity for the ratepayers to buy the owners out and created a cooperative utility. I don't live there but from the outside looking in it looks like they are being much more proactive about renewables and more importantly, storage.
Absent some kind of massive game changer in wave or wind generation, the whole game is really storage. I know a lot of people who would love to install solar, but HECO is already at max capacity absent a way to store electricity at scale.
Finally the part that gets talked about the least is economic inequality. Hawaii's real estate is expensive, but it is driven by investment from outside the state, making it almost impossible for people who live here to afford homes. That interacts with the energy piece because you have to be a homeowner to benefit from solar, so solar contributes to wealth inequality as people who are fortunate enough to own homes also reap the benefits of government subsidies and cheap electricity, while people too poor to own homes are left paying the retail rates. And this is before we even get into the distortions of behavior that net metering encourages when you treat a kwh of solar in the day as equal to a kwh of petroleum at night.
1. economic concerns 1.a. not having a job is not an ideal situation for attracting potential partners 1.b. having less disposable income means less ability to take people on dates 1.b.i covid has made this much harder 1.c. much harder to live alone 1.c.i. you might have roommates and feel it awkward to have sex with them in the house 1.c.ii. you might live with family and feel it awkward to have sex with them in the house 1.d. hard to pay for sex regularly 1.e. might not feel ready for even the chance of having a child 1.e.i might not feel like you can afford a child 1.e.ii having a child might have detrimental effects on careers (especially for women) i.e.iii you would think that increased birth control efficacy would reduce this? 2. health concerns 2.a increased awareness and fear of stds in the post aids era 2.b. more recently, covid 3. social issues 3.a. social media has provided an alternative and to varying degrees replaced some in-person interaction 3.b. porn is free and incredibly prevalent 3.c. slut shaming 3.d. fear of stigma of teen pregnancy 3.e. abstinence education 3.e.i but hasn't this always been the case? 3.f. video games are a lot of fun and less work 3.g. tinder 3.g.i must be attractive on looks (and profile wit) alone 3.g.ii winner take all dynamics