Apologies to Garret for assassinating his character based on a single blog post.
446 karma · joined July 22, 2016
Apologies to Garret for assassinating his character based on a single blog post.
Every single thing that can be represented or manipulated by a program is just an array of 0s and 1s that are read, manipulated, and written. The values in the array are the state, and everything a program is capable of doing only moves it to a different state of memory.
Every single program ever written is a state machine, so is every microchip for that matter.
As mentioned below, others (esp. IDA) make it so glaringly obvious that how you were working before was way harder than it had to be.
That combined with the other extremely dubious reasoning - e.g. (see my other very long comment) how replacing state machines with callback functions is a good idea (tm). There is also the comment RE: "how bad Windows APIs are" and how IO-completion ports are '_actually_ pretty nice'. This is the kind of comment someone makes if their worried the "real" coders won't take them seriously if they use anything but Arch Linux.
Makes you think he is reasoning about things that he just isn't an expert in yet (embedded systems, operating system APIs, long-term framework design). Nothing wrong with that though - everyone has to build up experience somehow - but maybe a bit early to be on the front page of HN.
But for many cases this is not necessary. A simple callback mechanism would be far better, with the FDs available only as an option for code that needs them. This is the approach that we have taken with nng.
Replacing a state machine with callbacks... something something something you're gonna have a bad time. Esp. considering the gripes are about readability, following control flow, and race conditions. Callbacks are objectively worse for all of those things. Control flow is hard to read in state machine frameworks because the primary flow is dictated by something like "nextState(thisState, action)", so you can't follow it with code lookup.
The problem here (and almost always) is lack of documentation or visualization (or picking the wrong abstraction level for the formally defined states). The beauty is that the definition is almost by default naturally easy to parse (tables of states in a header file, etc.). It takes some extra effort, it is a one shot to write something that generates graphviz state chars or something similar from the state table definition. You could write a custom dot syntax generator from a C-style table definition in what, three hours? Doxygen already does this for much more complicated stuff. Googling reveals this is nothing new: https://gist.github.com/freqlabs/24d88ad8e687891c970a69f16f1...
All that said, State Machines are (currently) the one true abstraction for a given program because that is what a computer is, and every program is, to begin with. If you're not using them explicitly, it just means you have a poorly defined/documented state machine. Maybe someday there will be a better model of computing, or a better way to model programs. For now, the human brain isn't getting any better at keeping track of computer programs, and anything more than single-threaded functional-style code is almost certainly not any "absolute" improvement in readability.
I firmly believe that visualization has become necessary due to complexity, and it is past time to embrace it. There is some stigma that visualization is for fakers - "real programmers only use a bare text editor" - or that it is for children learning programming, or non-engineering folks that need pictures because they're dumb. To be a bit hyperbolic, if we want any chance at keeping up with "the machines", we're going to need a better general-purpose, more workable abstraction than text files. There is no more canonical example of this than the issues pointed out here - state machines are the right abstraction for complex systems, but complex state machines are incredibly difficult to follow in source code.
https://news.ycombinator.com/item?id=13759157
Should have charged people for it though. They need the money.
I see they've invented a new name to label the innovation as such.
Saying "e-cigarettes" is nonsensical. There are 1000s of varieties of vaporizers and liquids. I'd wager if you take some bright, sketchy liquid from the corner vape shop and combine it with a $10 generic imported vaporizer there is going to be some significant deviation with impurities/toxins relative to e.g. JUUL or other products sold by a company that frankly has something to lose if they get sued.
As far as I understand, most of the unexpected chemicals are coming from vaporization or reactions based on the flavorings that were never designed for that. Or vaporizers that are poorly constructed and burn glue/adhesives/etc from the device as well as the liquid. So again you'd want to focus on those individual components or chemicals, and it makes no sense to generalize "e-cigarettes" by analysis of any one (for better or worse).
Also, not intuitively buying without far more evidence that vaporizing glycol/glycerine, nicotine, and water shares a rough equivalence in DNA damage potential to the raw combustion products of unfiltered cigarettes. There are some 7000 chemicals in tobacco smoke, and the list of the known carcinogens is over a page long on Wikipedia... https://en.wikipedia.org/wiki/List_of_cigarette_smoke_carcin...
Reminds me of the Archer episode where Cyril plants the computer virus and was going to be the hero by "fixing" it.
Math is a description of the physical universe not a definition. As another commented, what is mathematically possible and impossible is entirely our own invention.
At some point "condensed" thought just means reduced quality of communication. If some users want to say more, let them pay a dollar. I doubt users would be rattled to their core because some people can put two tweets in one.
Bottom line, users don't care about what Twitter's agenda is regarding character limit. Nobody decided to use Twitter because they were excited about a 140 character limit, they use it in spite of the limit. Twitter should be focusing on what the "in spite of" reasons are, because those are the reasons that define the intrinsic value of their service, not the character limit.
I believe most people use Twitter because it gives them the attention of an audience. If you can acquire the same size (or redundant, since most are on multiple platforms) audience elsewhere, then what reason is left for a user to tolerate any annoyance or quirk of the service?
They are only worth their Market Cap in the sense that investors literally bought-in that much because of a hypothetical upside based on scale. What happened when they tried to sell the company? The realization sets in that the company just isn't worth that much money, nor can anyone foresee how it could be in the near future.
It is a self-sustaining situation with these companies. Nobody wants to write off that big of a loss, so the valuation is sustained.
Many others are sustained on the inflated belief that the market for Ad views is adjusted for the prevelance of fraud. How many times has it been shown that click, view and user bots are used in staggering numbers. The companies making all the money have little incentive to correct this. But of course Ads clearly work in many situations. I'm just saying these bloated valuations based on ad revenue have not been adjusted for the fraud reckoning. Google struck gold because the underlying utility of the search engine is so unquestionably powerful and ubiquitously necessary to the idea of the internet that it guarantees a truly awe-inspiring user base. The value proposition of getting that service for free makes viewing Ads a second thought - it is a reasonable deal for the user.
What do people need from Snapchat that will keep them there? Sharing pictures and text messages is rapidly, and I mean rapidly, approaching a commodity service on par with landline telephones.
Anyways, the blanket optimists are subject to the same odds. If you believe everything is going to succeed, inevitably you will be correct. Everyone has confirmation bias.
If I'm to understand correctly, "We" are there to blow up hospitals and terrorize children, but also create propaganda to protect civilians from feeling bad?
Can you describe to me this large, tens of thousands at least, group of people that murders children on purpose but also cares about the feelings of all civilians? Specifically, without reinforcing the point that you'd be responding based on a tiny fraction of the intelligence that goes into these decisions.
If you think Snapchat has the same macroeconomic value to the world as Intel, Cisco, or McDonald's... Then you've lost the ability to evaluate a technology business.
I'm not sure whether to accuse this of being shill or to systematically prove how flaky the argument is. The fact is that it doesn't save photos is as much lack of a feature as it is character. The users of this app know how to take a screenshot... It's the ICQ of a different 3 years worth of teenagers that will get stomped by the next messaging app that is different from the one other people used for the past 3 years.
Snapchat is valuable because of demographics. Unfortunately those demographics grow up quickly, and the ones that replace them will rebelliously reject what preceded them just like teenagers have done for the last 50 years.
The fact that they are worth $18bn now is nothing but a prime example of the times. Mind you I know the company I'm in. VCs invest based on their bet and the reason that valuation sticks is more marketing than it is reality.
Snapchat just isn't that valuable to the world.
It's an excerpt from a book - I think the point is to get interested in the question not draw a conclusion ;)
I'm not saying we're always the "good guys", but every airstrike looks bad without any context. We never get all of the intelligence that goes into ordering an airstrike, so how are we supposed to make the same judgements about collateral damage, effect, etc.? How many other airstrikes happen flawlessly?
Aside from hindsight being 20/20, it is naive to assume that the public is capable of reviewing complex, difficult decisions about military action based on anecdotal information in a 1-page news article.
Specifically for motorcycles, as many experienced riders would say, sport bikes especially can hardly even be used on public roads anyways. My old bike red-lined 1st gear at ~96mph, i.e. there isn't a public road where it is legal to "use" the first of 6 gears. They're made for a track. On the other hand, RE: safety, in the overwhelming majority of cases the safety risk on a motorcycle is to the rider not the other drivers on the road. Motorcycle accidents where the rider was at fault and a vehicle occupant was killed are likely less probable than death via choking on a bagel. So a outlawing human drivers in this case sounds more like taking away an individual's choice rather than controlling any legitimate risk to public safety.
As for cars, I agree that it will probably at some point make sense to separate autonomous cars from human drivers. There is not much way around the fact that you can kill other people easily in a car, and that a great number of people would justifiably want to opt-out of that risk if they had the option. Someone's enjoyment of driving won't be nearly enough to justify otherwise that when the time comes.
I do agree it is a problem that we share roads, and many people don't take the risks seriously. People's poor judgement, e.g. using apps on their phone while going 70mph in a 3,000+ lb vehicle is disturbing. Motorcyclists experience things like this vividly, and often daily. Maybe fully automated cars are the only answer to that though, because relying on improving everyone's judgement, or policing it, might be the least realistic solution conceived (for anything).
Of course we want to make driving safer, and in that way autonomous capabilities are a ground breaking safety feature. Other cars probably need to be safer too, since we are a very, very long way away from even a simple majority of autonomous cars. Maybe one day we'll see the "end game" of zero-ish road fatalities, but that relatively distant possibility is not a reason to essentially outlaw driving. Keep in mind autonomous cars are also very expensive, and will be for some time. If the "outlaw" part came a bit too early, it could end up looking a lot like "People too poor to buy and maintain a brand-new car are not allowed to drive on public roads".
There are plenty more reasonable steps to be taken before that, e.g. since teenager drivers account for a disproportionate number of accidents/injuries, so maybe we don't need high-school kids driving. Or, maybe we need to require extra licensing for a housewife that wants to pilot a 5,500lb Escalade at highway speeds. Maybe people should go to jail instead of paying a tiny fine if they are caught using Social Media while driving.
The list goes on, without copping to the naive, even juvenile, conclusion that outlawing human drivers is logical because autonomous cars are safer.
It is difficult to decide if this statement is idealistic, naive, or written by an algorithm. I love motorcycles, as do many millions of other people, despite the obvious safety risks. This may come as a shock, but minimizing risk isn't the sole goal of everyone's life on earth. By this logic, we shouldn't "let" people play sports because purpose built robots would be statistically better.
But there are still a lot of people that love to drive. This can be a fun recreational activity but we just don’t need those people on the road.
No, what we don't "need" are Autonomous Cars. We need food, water, and shelter. We want autonomous cars the same as any other modern technology. And by the way, marginalizing the interests of millions of people with language like "those people" typically does not go over well. And whom is "we"? Because it sounds like Rick's spaceship: https://www.youtube.com/watch?v=m0PuqSMB8uU
(There is also a highly relevant Futurama episode that satirizes this topic: https://en.wikipedia.org/wiki/2-D_Blacktop.)
For anyone that is ready to stop consuming themselves with all things esoteric and start writing generally good code by default.
If more devs followed the relatively simple patterns and practices in this book the phrase "legacy code" might not be a curse-word.