skysight-inc/HackerNews huggingface dataset:
But I wonder if there would still be something more elegant than the every-other-line error checking shown in the article.

Factor out the error checking into a function:

onerrexit(is_numeric($id), 'The ID is not a number.');
onerrexit($db = open_database(), 'There was an error connecting to the database.');
...

I admit you still have to explicitly state you're checking, but that's not much overhead, makes the code somewhat clearer, and gets rid of all the if(...). If the error-action is more involved, like your "third paragraph", then you can make an errcheck that takes a function reference for the error-action instead (not sure if that's possible --- haven't used PHP in a long time --- but there's probably a similar method otherwise.)
If it's internal, you probably shouldn't be using the API Gateway. You can just call the underlying lambda directly through the SDK with invoke and save yourself the cost of the API Gateway, as well as be able to invoke it asynchronously should that be a better fit.

That said, it depends on your design/architecture as to whether that is appropriate or not. Sometimes you want that distinct separation. But if that's the case, you should also probably not even be thinking about that low latency case, because you should treat it as a service outside of your control, that may be (and probably should be) cross regionally available (so you might even be crossing the country, for all you know. This presumes the inclusion of latency based routing with a custom DNS, of course, but for a standalone, client facing service, that's what you should be doing anyway).

Obviously there may be a middle ground you want, but I'd say you probably either want to treat it as "your" API, and thus, you can be as pragmatic as you want when accessing it, or you want to treat it as a reusable, completely separate service, that you are a client of, in which case things like location can not be guaranteed, and thus latency is a reality.
Of course you can protect those lines against drones: just bury them. Stop using aerial lines.

There are always issues, though. A few years ago, in my city, a neighborhood had an opportunity to vote for aerial or buried. Even though ´buried' made a lot more sense, they voted for aerial, because many feared "consequences" of being near the electromagnetic field of buried power lines.

Fear, Uncertainty, Doubt ... all caused by inadequate knowledge. That is the #1 problem to solve.
I assume that's what is meant by "default".
Is Signal app compromised?
If I had to choose, I would rather have an incompetent and bloated organization dedicated to helping people than a sleek and hypercompetent one dedicated to exploiting people. The former will at least occasionally bumble its way into helping people; the latter will do the bare minimum necessary to keep its worker units productive, and aggressively optimize away all other good outcomes.
>if j % 2

This type conversion madness needs to stop. Integer 1 and Boolean true mean different things.
>; someone in the market for house stuff does expect Houzz to help them buy it (it's not obvious what the deal is). [...] ; many Houzz users are indeed looking to DIY.

Yes, you're right. The user-interface to Houzz website does not make the "professional marketplace" distinction obvious.

Houzz does get revenue from both product companies like IKEA furniture, and Viking and LG appliances, etc. They also get revenue from professional contractors to show up in listings when people search photos for "ideas".

Yes, it's not obvious that 99% of the idea photos that people bookmark into their ideabooks come from professionals to advertise their "services" and not product manufacturers to sell "stuff".
It took more than a century to arrive at where Marx in "Das Kapital" already was. Please, I am NOT talking about the communism spirit which resonates with "Marx" as in "Marxism" but purely his economic theories.
Do you make median income or less? (For a full-time worker, that's about 41,000/yr.)

I think most of HN is in the "baronet" class (say, 2-3x of median income) or higher, and doesn't necessarily have a good perspective on what most people (ie, those at or below median income) deal with.

Per capita income has flatlined for a decade (since 2008), after 60 years of steady growth. But that largely doesn't impact programmers, entrepreneurs, etc. Instead, it impacts the people on the bottom.

Just because the present system works for you doesn't mean it works for everyone.

It was always good to be king.
The Unbearable Lightness of Vendor Security
I was at a new client the other day and notice that for all their tables in SQL SERVER, they use an IDENTITY column for primary keys, obviously seeded by SQL SERVER. What I found strange is that they allow deletes of records, allowing gaps in the sequence.

Is that normal practice? Their DBA was insisting that its normal.
Not at all. There's a native Postgres UUID column type, stored as a 128-bit number as opposed to a string. Postgres indexes are also not clustered, so will not suffer like MySQL when using an UUID as a PK.

Using an UUID is not performance optimal, but it is developer optimal and mitigates many other problems listed in this thread (offline sync scenarios, merging partitions or datasets, tracking across systems, opaque external representation perfect for APIs etc.) so unless you're really squeezing the last performance drops from a system I would simply use an UUID nowadays.
How the Death of Net Neutrality Could Hamstring the Internet of Things
This is incredible. The best part is that it's incredibly simple. Excellent job documenting via example.
I think you're mixing 2 things. This is a complete rewrite of an old key-value store (hence the 2 in the name) but comdb2 was always SQL. Comdb2 shares a few things with comdb, but they're really just to make migration easier (the preference for tags in csc2 files instead of usual DDL, and then a tag based API that it looks like we got rid of for this release). Under the covers comdb2 is completely different and as far as I know shares no code with comdb.
Guns of Boom BLOWING Up on Android
Give the gift of privacy
As to why they are trending ...

With recent(ish) leaks about what the NSA is doing in terms of breaking widely-available crypto, the question has arising about what weaknesses might exist in current classical techniques. RSA and DHMW have been around for a long time, and much is known about specific weaknesses. Some primes need to be avoided, for example in DHMW one should avoid primes P where (P-1)/2 has lots of small factors.

But all the elliptic curve cryptography is comparatively new, and weaknesses are still being found. It's plausible that there are simple things to avoid when choosing an elliptic curve, and so perhaps we should just use the elliptic curves recommended to us by security experts.

But after Snowdon, etc., people are becoming wary of trusting experts, so they want to know more about the implications of their choices, and what options they might have. This is an on-going issues, and now, as people are starting to understand the mechanics of implementing systems that use elliptic curves instead of just Z_p, so articles are being written aimed at the non-security-community people.

And so articles appear that are readable and relevant.

Just my $0.02
> Despite your disgust with the poor

> Spreading a lot of ridiculous nonsense about how these people are worse than animals

How the hell did you turn "living conditions for the poor are appalling and must be improved" into "the poor are disgusting"?
We don't use stopwords because we want to find all the best and complete matches. We don't want to ignore any of the words part of the search query.
It's not really two ways of reading an action. It's two separate actions. One is providing insurance to people with interlocks. The other is using a monopoly to promote that insurance.
Using Pseudo-Terminals to Control Interactive Programs (2010)
TLDR; Locally collaborative greedy planting strategy leads to globally optimal results and looks like a fractal from above. Mind == Blown.
I think you're possibly seeing what you want to see. Both the fonts themselves and the typesetting of the logos are pretty different. Trader Joe's logo font is serif with all the letters equally sized, the letterforms are curved to avoid right angles, and it is spaced in an orderly fashion, while Pirate Joe's is sans serif with very differently sized letters (e.g. the A and O are about twice as wide as the P), the T completely encroaches on the E to the point where the E has to shrink, the letters aren't particularly curved, and there's a heart in the middle. Basically the only thing they have in common is that they're they're both kind of whimsical.
Moto Z2 Play Review: Unlimited Possibilities – SuratNow
Is this deep background check again a US thing? In Germany it's even unlawful to ask potential employees if they are pregnant. It's essentially discrimination. Maybe some HR will check your social media accounts and search on Google for you but generally police records (at least my experience in IT) or even health records are not requested (or against law!) unless it's a high responsive job like e.g. becoming a police officer or maybe military.
> Where else would the next major advance come from?

Probably from sustained and detailed study of the universe around us and the way it works. That's how we figure out most things. Not that (board) games can't be useful as training but IMO they're a form of navel-gazing. (Games based on high fidelity simulations are definitely useful - look at the AI research using GTA5 as a simulator for self-driving cars, for instance.)

> I certainly believe story-tellers and players are absolutely critical if humanity is to pull through.

In the sense of us dealing with our own demons and learning how to handle the general awfulness of reality (ie. psychology / philosophy), I completely agree. In the sense of us dealing with outside challenges, though, not so much.

> Just curious -- what do you see as the "current existential dangers"?

Right now? Our current economic system is close to its limits, with a growing percentage of humans permanently unemployed and that percentage is growing rapidly with new tech. Various ecological systems are collapsing. (eg. pollinators like bees being wiped out by insecticides - have you ever read John Christopher's "Death of Grass"?) Runaway climate change is a real possibility (ocean warming causing methane clathrates to release large amounts of methane into the atmosphere). Higher human populations and population densities increasing the evolution rate of diseases beyond what our immune systems can handle. And all that on a backdrop of a looming AI singularity which even in the best case will make the world weird and confusing beyond the comprehension of baseline humans. There's a lot going on.
You just need 2 points to draw a line... ;-)
Yoav's response to Yann
https://medium.com/@yoav.goldberg/a-response-to-yann-lecuns-...
I'd guess: survey for sources at stellar brightness and low temperature. Dunno if it's been done.
sure, feel free to contact me by email or DM on twitter.
gio archive org
Duh this totally look like when a pyramid scheme start imploding. But I think someone will quickly pop in to explain that I didn't get it because of the block chain automagical cryptosecurity... meh
Family + Atomic Bomb should produce Thread (http://www.imdb.com/title/tt0090163/).
As a heavy daytime user of Go, I kind of get what you're getting at. You gave as examples two of the most typical cases of Go boilerplatitis: Error handling and for loops. Of that, error handling definitely gets refactored to set states, wrap errors, do cleanup (though less often, since go has defer) etc.

I find myself refactoring Go code a lot in patterns just like you describe (internal functions for error handling), but for me it feels like a throwback to my imperative programming era of the 90s, using Pascal and C. I'm still old enough that it automatically clicks in my mind as clean code, but I also know it's hopelessly verbose.

Error handling doesn't have to be this verbose. In other static languages that eschew exceptions you could do something like this to achieve the same result:

let result = try!(DoSomething());

This form is clearly more readable once you understand what try! does (which doesn't have a steeper learning curve than the weird if syntax in Go).

Now, can you refactor it without throwing away all that nice terseness? Sure. Let's say we need to wrap the error value:

let result = try!(DoSomething().map_err(|e| MyError.wrap(e)));

It takes time to get used to, but you state what you're doing instead of how you're doing it.

Go's verbosity is even more cringing with the loops, and this is actually a place where I rarely need any refactoring in my experience. Is your experience any different? Can you give an example of you ended up refactoring loops?
When I was doing research projects for my undergraduate degree we primarily used the web differently.
0. First thing we would search is the Arxiv front end http://front.math.ucdavis.edu/ . Usually we would have a researcher in mind. If we didn't then we would look at Wikipedia.
1. We would use wikipedia to get general knowledge and information about the topic. Sometimes lecture notes and presentations would be looked at too but we would eventually get to papers.
2. If the topic was relevant after getting the gist we would look at the citations on wikipedia and track down authors.
3. Books we would obtain electronically. Papers would be tracked down on Arxiv.
4. Rinse and repeat if you didn't understand a topic that was cited in any of the other steps.
Yoav's response to general criticism
https://medium.com/@yoav.goldberg/clarifications-re-adversar...
Self-Normalizing Neural Networks
If your use case fits S3 (eventually consistent updates are okay, no complex query model), you should almost always prefer it to RDS. S3 is usually cheaper than RDS (lots of updates may negate this, but storage costs and then usage based billing = most cases are cheaper. If your DB load is so low that you can reuse it between projects, and your query model is sufficiently simple that S3 could serve it up, you might try running some numbers). It also scales transparently, and infinitely. RDS requires downtime to scale horizontally, and goes only so far.

The general suggestion, from AWS themselves, is to try and fit things into S3 first, and only go for RDS (or DynamoDB) if it makes sense to. Barring a clear indicator, S3 will almost always be cheaper, and has no scaling concerns. That's also been our experience; defaulting to S3 has been the cheapest, and required the least maintenance from us, and only when we come up with a good reason (need for complex or high performance queries, generally) did it ever make sense for us to reach for RDS or DynamoDB.
You've forgotten advanced knowledge in neural networks, molecular biology and (for some reason) medieval books.
Tax something too much and you'll create a grey market. Then we can throw people in jail for selling loose cigarettes or maybe just choke then to death.
>In Python (and many other languages), it’s very easy to unintentionally hide tons of work in a single line of built-in syntax. Some lines do almost no work, other lines do a moderate amount of work, other lines do what I’d describe is tens of lines worth of work—a lot of work. It varies a lot, even in beginner code. In Go, I’ve found that this variability is much more diminished.

I call BS. Consider these 2 Go lines:

heck_if_I_know_what_this_does()
heck_if_I_know_what_this_does_either()

Just because Go has less powerful primitives, it doesn't mean that you don't use opaque code, libs, etc. all the time. Sure, you can look into what each function does -- but then again, you can also immediately tell that a list comprehension in python is doing at least O(N) work compared to a simple addition, without even having to open any other source file.

>Is this good? I believe it is. I believe this code is more proportional to the complexity of the work that it’s doing.

We invented programming languages on top of machine code so that our code can be LESS proportional to the "complexity of the work that it’s doing".

>When reading proportional code, it’s easier to notice where the interesting bits are.

Not really. It's the inverse: the terse code only keeps the interesting bits. The "proportional code" gives you all the non-interesting, and getting in the way, mechanics.

>When a friend was reading through the source code for ssh-chat, he was surprised that I implemented my own Set type. I explained that while Go doesn’t have a built-in Set, it’s just a few lines of boilerplate to make your own on top of a map. In fact, I noticed that my version of Set evolved to be fairly specific to how it was being used. In retrospect, I’m glad that I was tweaking my own implementation iteratively rather than spending time working around whichever limitations a generic library might have had.

Pray tell, what "limitations" a generic Set would have?

And why does those kinds of post remind one of Stockholm Syndrome?
Palo Alto Networks Capture The Flag
This exact thing happened to realitychecknetwork hosting about 6 years ago (now rebranded to serverstack and digitalocean).

There was 250+ dedicated servers, 2-3 weeks of restoring week-old backups (thankfully they had these weekly intervals kept offline). Mass exodus of clients.

"Ex-employee" used root keys and a boot zerofill drop and rebooted every server resulting in severe data loss. Their online backup systems were also using these keys and we're not spared.

They said they would have to shut down the company as a result, but ended up securing capital and eventually launching what would become digitalocean.

They said it was highly probable that it was an ex employee and that the FBI was investigating buy nothing was released about it.

Good cautionary tale for segregation of credentials and proper user key management.
Trader Joe's doesn't want customers who spend a ton of money buying in bulk at full retail price. Furthermore, they clearly have no intention of expanding into a large market that desperately wants them. What kind of business is this?
> I disagree. Once again, we can find a scapegoat at the lowest possible level and "stone" them or we can do a proper post mortem and try to learn from it.

If he did it (intentionally wiping the servers), then he is a criminal and a bad person.

If he is a scapegoat, then he didn't do it, so that's a totally different situation.

I don't see how you can disagree with either of these statements.

And discussion of how he still had access is an unrelated matter.
It's not fine. As we continue to resist new technologies our country will stagnate and others will outcompete us.
Aside from both being distressed, they are not similar. Trader Joe's uses a serif font, this is sans serif.

The colors are similar.
That's silly!

Programming is more than that.

This is best: sum(range(0, end_range, 2))

;)
I know this is an old(er) post now, but thank you very much for the link. We actually had not seen that site before, and it's a treasure trove of fantastic information -- some of which we've found out ourselves, much of it new to us altogether.

You're right -- there's very little written on the topic. Though Unity has a fantastic community, and a large swath of information & user help to be found, a lot of it is directed at the newer/simpler developer (or mobile specifically).

Much of our work, and findings, has been derived from running our own tests & benchmarks as well as reading research/white-papers. In general, we've kind of found that many [advanced] game dev related topics are not well publicized or are fairly tightly-held. Our best source of information for things like highly advanced pathfinding, or low-level & high-volume multi-agent modeling/simulation strategies, have come directly from published academic research which has also been a treasure-trove of information.

We've read more research the last year or two than we did through all of school and the first ~10-15 years of our careers combined! =)
Yea, this is really nothing special—I'd imagine anything that compiles to native code would need all the
Also, it's easy to forget that this is an important place for tech PR and advertising - so there is some incentive to appear smarter than you actually are.

(Not implying there aren't a ton of genuinely exceptional people here)
> IMO Sometimes finding the goal is part of the fun.

That's life.
>I agree with you, but seeing the number of proponents of Enterprise Java there are, it's clear that there are a significant number of programmers who prefer verbosity and extra abstractions --- although IMHO not necessarily because it's actually better.

Even Enterprise Java wasn't verbose for the sake of it (I say "wasn't" because modern enterprise Java can be more like modern functional style than Go).

It was more verbose because it added tons of options and flexibility while keeping with the OO style, so everything was pluggable and configurable and factorable. But that's something else than Go style verbosity.
Yes... both profs are external sante fe institute members. That's kindof their chorus.
Woebot – Your charming robot friend who is ready to listen, 24/7
To all duckduckgo fans I recommend using brave browser
>If it's internal, you probably shouldn't be using the API Gateway

It's common enough that when I asked Amazon about it, they already had enough requests that it's on the roadmap.

People use api gateways for all sorts of things like orchestration, tokenizing sensitive data, caching requests, etc, that should have the same interface whether used internally or externally. Sure, I could recreate all that functionality for internal use, but that's one of the supposed benefits of an API gateway...turn what was code into configuration. See products like Apigee, Kong, Tyk, etc.
Barbell Training Is Big Medicine [pdf]
Asking potential employees if they are pregnant, married, plan to become pregnant, have children already, etc... is illegal under US law as well. Common German practices like asking for a photograph on an application or CV or asking about a prospective employee's religion are also usually illegal in the US, as it's pretty hard to think of non-discriminatory reasons an employer would need that information.

Asking previous employers about their experience with an employee, however is not illegal. It's usually not illegal for them to say something negative if it's true, though some businesses are conservative about what they will say out of fear of being sued for slander. Accessing public court records or news stories about criminal cases and using that information for employment purposes is usually not illegal. Asking prospective employees if they've been convicted of serious crimes is usually not illegal.
There's a heavily modified SQLite embedded in Comdb2 for query parsing/planning. There's some auxiliary tools that can optionally use SQLite (or Comdb2). It'll run without installing an SQLite package.
Are Google, Amazon and others getting too big?
Client-side image maps have been around since HMTL 3.2 (~20 years). What's special about your tech?
>Your comments clearly ring true, for the example code snippets shown. But i think you have missed the point of the article, which is the benefit of the Go version when iteratively changing the structure.

You can iteratively change a smaller, terser code, must faster. There's a reason prototypes are often written in languages like Python.
It uses components of SQLite, included in-tree.