skysight-inc/HackerNews huggingface dataset:
I'm disappointed that of all the patterns presented, most of them actually increase the complexity to some extent, and none of them are the use of a lookup table/array. IMHO that is the "real anti-if pattern" here, and it can immensely simplify code. I've taken long, convoluted nested if/else chains with plenty of duplication and turned them into a single array lookup. A bonus is that performance and size often benefit as well, since the code is far less branchy.

http://www.codeproject.com/Articles/42732/Table-driven-Appro...
Growth hackers are the new VP of Marketing, here is why
Yeah, it's hard to think of how this could not be an example of transformative use but I'm sure I'm not legally creative enough to assert that:

http://fairuse.stanford.edu/overview/fair-use/four-factors/#...

In a 1994 case, the Supreme Court emphasized this first factor as being a primary indicator of fair use. At issue is whether the material has been used to help create something new or merely copied verbatim into another work. When taking portions of copyrighted work, ask yourself the following questions:

Has the material you have taken from the original work been transformed by adding new expression or meaning?
Was value added to the original by creating new information, new aesthetics, new insights, and understandings?
>In the grander scheme of things, that's scale and concurrency.

I actually laughed out loud. I'm just the Postgres team would love your insight into how they can implement master-master replication because "it's not novel or difficult."
Thank you. I thought it was just me finding webpack confusing.
Yes, but you basically implied he deserves "more."
Machine Learning Recipes with Josh Gordon
i had exactly the same experience
Steal My Idea to Build a Profitable Startup from Day One
Facebook is not a CRUD application.

Facebook is a graph theory application.
This is likely the plot progression for the next episode. (which is why the UI was hidden to the viewer)
I agree that style of Picasso is cubism and this process isn't able to replicate that. But I assume it's an early experiment to show what's possible now.
Bootstrap 4: A Visual Guide to What’s New
Interesting example. In it, how exactly did this water right transaction take place - was our strawman libertarian the only one trying to buy water rights? If so, why? May be he foresaw drought earlier than his competitors on the market - and in doing so, is rewarded for his climate prediction skills and willingness to investment in infrastructure?

If he wasn't the only one, how exactly did he outbid his competitors? I'm asking these questions because this example doesn't seem realistic in libertarian effective free market paradise - on the contrary, this kind of situation arises with some regulated monopoly, not with a freely traded good. And just let me clarify for clarity, paying bribes to get purchase preference (which, let us be realistic, is the most common scenario here) is certainly _not_ a part of libertarian ideology.
ATM's at casinos and clubs can charge $5+ dollars for a withdrawal, but that doesn't make it a viable solution for even %10 of ATMs.
The system in France appears not to be that of lottery but of investing into taxi licenses´, the number of which the government keeps artificially low due to violent industrial action by licensed taxi entrepreneurs. It's more rent-seeking than lottery.
Some versions of the STM32F415 have 192k but the one I'm currently using only has 32.
Life under the Ancien Regime had some clear parallels to modern times in America superficially, but there were clear differences too. Pre-revolutionary France was not at all modernized compared to the rest of their neighbors for one thing, so that lent a pressure all it's own that was unique to that time period. Some of the root causes for unrest may be similar but it's not a direct analogue by any means.
That is really, really creepy. I will not pay money to or enter into any sort of business relationship with a real estate firm that wants to be on my Facebook 'friends' list.
You could just 'Right Click->Open in Incognito' instead of manually copying the URL, at least in Chrome.
> With this security model it is in essence no better than plain USB flash drive

I disagree. With the right firmware, the SC4-HSM can securely generate keys that cannot be compromised without decapping the chip.
Did Google Manipulate Search for Hillary?
Uhm. No, no, no, no and no.

> [Pattern 1] Solution: Split the method into two new methods. Voilà, the if is gone.

And so is parametrization.

> [Pattern 2]: Solution: Use Polymorphism. Anyone introducing a new type cannot forget to add the associated behaviour.

OTOH you make extensions more complex. I usually write in lisp and DO NOT use polymorphism for this but etypecase in the base implementation of a method (switch/case where the default case automatically throws an error). This allows people who extend my code to implemented a method specific to a type that my base implementation handles and thereby overriding my implementation with minimal effort.

> [Pattern 3]: Solution: Use a NullObject or Optional type instead of ever passing a null. An empty collection is a great alternative.

This is, IMHO, not relevant at all - the decision how null values are handled simply has to be documented so programmers can make an informed choice. The only exception I accept is an empty collection which I'll always prefer over null, assuming that all other code handles empty collections gracefully.

> [Pattern 4]: Solution: Simplify the if statements into a single expression.

Works for the contrived example (and we all know that the code is really bad). For more complex code I rather follow the logic line by line instead of mentally disassembling a 10 line boolean expression.

> [Pattern 5]: Solution: Give the code being called a coping strategy.

No, just no. One does not aim at removing exceptions. Those are to be handled by a higher layer who actually knows how to handle it. If one uses default values one still has to check on that layer with the added burden of using a default value that is guaranteed to never be returned as a real value so we can make the distinction between record found/record not found.
There are pictures of a rusted one here. Poster claims it is steel and I'm inclined to believe because aluminium does not rust like this:

https://teslamotorsclub.com/tmc/posts/1512181/
Sounds like the USA is covered by a manipulation machine that is impossible to defeat.
If your core competency is something you don't like doing then your business is probably going to fail regardless. Keeping that in-house should be obvious.
Inspired by Genius: How a Mathematician Found His Way
Serious question: how is this different than one of the many photoshop filters that could be applied iteratively to each frame?
One of the bots posing as an attractive woman that you added 4 years ago is already your friend.
Can someone knowledgeable estimate, how far are we from rendering this in 60 frames per second? Can't wait to try it as a post-processing layer in game development.
Would be interesting to see if they could reduce the temporal noise without compromising the overall effect.
Ouch! As a hiring manager, the "Javascript only" model is a serious roadblock.

Nothing against node.js, but a candidate would be marketable to a broader range of shops if the program gave them a basic grounding in Python and SQL. Python is well accepted for both web servers and sysadmin type scripting. SQL is the most common choice for databases. I don't think either one would be a incremental burden and would really open up the number of potential employers for the grads.
No. Imagine offering a stick of gum to someone whose dog just died. If I suggest that's an inappropriate response, I am not implying they should've offered more gum.
How can it not be? Every other program about being a doctor has so much personal drama and sex going on, they barely have time to look at patients. (Except House MD, but he's obviously unrealistic, even in the show itself.)
>"...the most vindictive account of a student's experience at Hack Reactor ..."

You give yourself so much benefit of the doubt, but offer none to the author, who you've decided is out to get Hack Reactor? That one swipe at the former student is more concerning than the rest of your comment is reassuring, to me.

An alternative reading of the situation, if you're not seeing one: the author has attempted to better herself by one common approach in the programming world, and having a bad experience, she is sending a warning back to others who are seeking the same improvement, telling us, 'this may be the wrong direction.'
Nice! I really am excited for you (and us)!

Re OWS; yes, I still keep some small hope that they've just been too preoccupied and not completely thought/worked things through. People are human and they've clearly had a lot going on! Their position as stated really did surprise a lot of people. Matrix.org's views on decentralisation certainly sounds FAR closer to the future I'd like to see for the net. Being able to evolve or change clients and integrate new technologies, without cutting off the entire network, seems clearly a very good thing indeed.
Except the "beneath" part, I think that's more of a reference to Peter Thiel and Blueseed/Seasteading.
I remember watching an interview with the creators of South Park in which they described the transition from animating using cardboard cutouts to a system with CorelDraw and other pieces of software which helped speed up the process. The bulk of the efficiency improvement came from carefully defining all the frequently used objects (characters, houses) once with movable components, and reusing those objects in the per-episode animation pipeline.

I can easily imagine an animation system like the one presented here enabling another massive improvement in animation efficiency. In the same way animation software allowed South Park to reuse pre-drawn objects, a deep learning system could enable south park to carefully define the entire drawing style just once, then generate complete episodes based on simple story boards and animation directives. Fortunately, South Park already has a significant amount of training data available, specifically every South Park episode yet produced.
Not happening in this lifetime at a meaningful image resolution. The style-transfer implementations require very large amounts of GPU processing.

If you pay attention to the video, the images are heavily upscaled.
Really I was just trying to be polite in what I expected to be dissent. The video looks cool, but I don't believe the network used has any understanding (however you define it) of Picasso's style, as another commenter has stated. It's a little misleading, especially since there's a lot more going on in Picasso than geometric shapes and crazy colors.

Then again I might take things too seriously. There was only one other comment when I posted, I didn't know what the tone would end up being.

Incidentally, I chose this handle because others always spelled my name "Steven", when it's "Stephen".
Fair enough, but they were a profit-seeking company, and a centralized, proprietary one at that. It wasn't some kind of open-source service that you can download and run on your own server that conquered MySpace; it was a company that started small (serving only college students at first) and hired employees and grew.
Microsoft Is Teaching Your Plants to Talk Back
Pretty sure it was product placement.
Why vote this crap up?
There likely isn't a Picasso Photoshop filter that can match the fidelity of the style transfer used in the video. (I checked; the best you can get is a macro to automate faux-cubism)
I can't recall the context, but super yachts, of which Tom Perkins is known for, was a big thing in the 90s. James Clark (Netscape founder, alongside the students) was big into his yachts at the time as well.
Google Cloud Console Is Experiencing Outage • Vlogg.com
In rodents fed high-fat diets, gut microbes boost hunger, trigger obesity
This is amazing. That said it doesn't have the distorted perspective I think is a hallmark of Picasso's work.
Ah, I see :) Yes, I have no measurements or anything like that, just a gut feeling based on how frequently I have seen it, which could easily be biased.
Grandparent is asking for help, not offering repayment in the form of a beer. It's certainly not going to happen if the article's author also sees it as a compensatory transaction. Recognizing that the author has taken some time to consider what may be serious flaws in his program, GP is hoping that the author's desire to pave a better path for others may extend to helping him think about his own program critically.
This post is about more than emacs/vi. HN title should be renamed "Unix taste" because that is the subject line.

I wish more programmers thought like McIlroy. Good taste is rare in programming. He has it.
Supposedly a court jester could state the facts with impunity...
As likely as that is for 98% of the population, everyone on my list is somebody I know face to face. And I don't put personal milestones/problems/drama on facebook. More like technology news posts about Keurig cup DRM systems, ipv4 exhaustion and old German cars. I'd love to see the inaccurate results of a profile created entirely based on that content.
What do you think about React and Flux / Redux? What’s your favorite view library?
I like it. Some feedback in no particular order:

- Initially, I wasn't sure how to use the app. Perhaps the main page should be the current day?

- It might be better for the links to go to the actual article, rather than open a popup window containing a link to the article. I like to open links in new tabs, but the current design makes this difficult.

- Pagination would be nice. 20 results are sometimes too few, but I'm admittedly a power user.

- I'd personally love a site that shows a filterable list of all available news articles. One of the options would be to filter them by date, or to filter by term. It's probably a bit heavy handed for the interaction to be a clickable calendar.

- On the other hand, a clickable calendar is a neat way to present news articles. E.g. you could fill each day with a bubble containing most interesting trending news.

By the way, you may want to resubmit this as "Show HN: Open News Digest" with no text. HN penalizes text-based posts (like this one) to discourage people using it as a blog, so you're more likely to get upvotes and visitors with the other format. Best of luck!
I think I learned in my marketing course that we (statistically) tend to look out for ads for things we have bought after the purchase.

The reason is hypothesised to be because our brain is actively seeking confirmation of previous decisions.

That said, your case most definitely was because of indiscriminate retargeting. Also I guess the effect I mentioned is more visible for bigger purchases : )
This guy FUCKS!!
Monica is just there for the happy ending.
Google doesn't do certificate pinning with HPKP. So nothing stopping a despot country from using certs signed by a valid CA. And of course there are compromised CA's. The US is just smart enough not to do this for mass collection, otherwise they'll get caught.
This is why all commenters should avoid using the general 'you' when making hypotheticals, and instead talk about "a person" or perhaps "someone".
Are the semantics to this comparable to Haskell's pattern matching on function arguments?
Wow. Descent? I haven't even thought about that game in a decade and a half. I feel like the hardware required to play that game doesn't really require lugging, these days.
There might be something to the headline but the content isn't delivering.

1. You can't compare making an ios and android app to making an app for every bloody broweser, I mean you could just as easily built your webite to safari and chrome for mobile.
You want a true cost comparision compare building an app for universal windows, and mac and linux.
Of course if you reduce the scope of your app's access you are going to get reduced costs.

2. Building a messaging app is probably the least appropriate and one of the hardest things to build with web technologie( after a game).
Use the appropriate technology for your app.

3. By your remarks on how costly mobile developers are, I'm guessing you've hired to inexpierenced web developrs. Get expierenced developers who know the limitations and best practices and you wont encounter so many issues.
I do this a lot too. Often long chains of if statements are really performing a manual mapping from one set of values to another. Just keep a map and perform a lookup! Easier to read, easier to change, and easier to extend since the mapping is a data structure instead of code.
Other companies (tech compnies, even) engage in ridiculous behavior like timing the minutes of your bathroom breaks, and so forth.

Call centers, data entry, tier one support.
Hacker News' as an audience is quite critical, of critics and their criticisms when the criticism is seen to be facultative

I never took your comment to not be polite. As mentioned, as a community. We're all quite guilty of being overly logical and serious. It's part of the charm.

I wasn't sure if I wanted to start collecting down votes for mentioning the Phteven meme (we don't like meme's here, do we?). But I had suspected that might be the basis for the spelling of your handle!

I'll down vote my own comments and see myself out...
It also occurs if you cotinually tweak a single search term, for example adding more and more exclusions to try to bypass Google's 'suggestions'. I encounter it about once a month.
And now the Weissman score is a real thing?

https://en.wikipedia.org/wiki/Weissman_score
This resonates so much! In our group who started with IPX networks to play Doom there was always one less technical kid whose PC was so loaded with viruses the rest of us would spend a few hours helping troubleshoot his issues. A reformat always came next.

Pat, you were a legend.
This is only true in a very technical sense.

function getColor(str){
if(str=='blue'){ return '#0000ff'; }
if(str=='red') { return '#ff0000'; }
}

getColor = {
blue: '#0000ff',
red: '#ffoooo'
}

The second one also has if statements inside the implementation of the hash map, but it isn't actually polluting your business logic. The question is no longer "what do you do when the input is like this or like that", but "lookup the corresponding output".

The distinction is nice because I know that getColor[thing] will likely have no side effects. I can treat it, on a theoretical level, strictly as a map.

Of course if the problem is "implement this on a machine without branching" this isn't super useful but most problems are not that.
Ye olde definition implies physically attractive people can't be nerds, and unattractive people can't not be nerds.

An alternate interpretation is that 'nerd culture' has become an ugly perverted commodity of its former self to the point where the requisite "hot girl" is put in front of eyeballs with no authenticity and offers semi-humorous-because-she-doesn't-quite-get-it-but-still-tries-her-best one liners while simultaneously manifesting this new proto manic pixie dream nerd girl persona-having no real purpose or reason for being there other than to rope in the casual viewer looking for something, anything, anything but another TCP/IP joke.

Physically attractive people can be nerds. Nerds can be physically attractive. But let's not fool ourselves on those tropes that still exist and get trotted out there making everyone look like damn fools: The hot girl who tries to be nerdy with a front as transparent as saran-wrap, and the incapable, slightly awkward-looking but you can't figure out why nerdy guys who pine after her because she totally understood how heavy the ending to Empire Strikes Back was and enjoyed it.

I call "The Big Bang Theory" to the stand.
United Egg Producers to end culling of male chicks
Canadian schools don't charge that much
Dont worry the NSA keeps a copy for you just in case.
> nothing useful for me

I hope this particular quote would be useful for you then

> Idiot is a word derived from the Greek ἰδιώτης, idiōtēs ("person lacking professional skill", "a private citizen", "individual"), from ἴδιος, idios ("private", "one's own"). In Latin the word idiota ("ordinary person, layman") preceded the Late Latin meaning "uneducated or ignorant person".

> An idiot in Athenian democracy was someone who was characterized by self-centeredness and concerned almost exclusively with private—as opposed to public—affairs. Declining to take part in public life, such as democratic government of the polis (city state), was considered dishonorable. "Idiots" were seen as having bad judgment in public and political matters.

https://en.wikipedia.org/wiki/Idiot
Your Children Don't Need Homework Help from You
I remember when The Scanner Darkly came out there was a lot of talk about how they achieved the style of the film. Some of it was automated, but a lot still had to be hand done. I wonder if using deep learning systems we could achieve the same effect that film had with nearly zero human interaction.

For those that haven't seen the movie, here's the trailer: https://www.youtube.com/watch?v=TY5PpGQ2OWY
This is the usual practice for registering copyrights, but I don't think you need to send the whole source.
True to an extent, but I think you extrapolate further than the attitude really extends. The demise of the long gun registry is a counterexample.
What was the first one that you built? I'd be interested to hear more about this.
> An interesting question is how the corrective of taste manages ever to recenter the exuberance of evolution.

can someone please parse this portion of the reply for me ? i think i can get the _glimpse_ of a meaning, but unfortunately don't / cannot grok its complete elegance...
They demonstrated several use cases, live: furniture size checking, education about dinosaurs, distance measurements, and entertainment. Really, did you not see that?
Segment Introduces the Native Mobile Spec, Empowering Automatic Tracking
Out of curiosity, what kind of scripts can you write in Python that you cannot in Node.js?

Don't get me wrong, Python is great and has a number of really great number crunching libraries just a pip away, but if all you're doing is developing web apps and hashing out some scripts via the terminal... they'll need to know JavaScript for the client - but do they really need to come away with two languages after 3 months?
The Leading Test Driven iOS Apps Development Service Provider Company
Ask HN: Why do I get rejected by Facebook?
I'm applying for Software Engineering Internship for Facebook. I've answered the interviewer's questions correctly and my code is perfect in terms of performance and readability. I still got rejected and didn't even make it to the second round of interview on campus. I received a ThankYou email from the HR and no other interview feedback was given. Why?
The 35 (not 36) hour work week is mostly a myth. Most people work at least 39 hours a week (that is they do a minimum of 4h overtime), and a lot of them do additional overtime, also in the public sector and the large corporations.

The current government has been trying for months to pass labor reforms addressing overtime and employee dismissal. Those reforms are essential for lowering the unemployment rate, but are , as expected, met with very strong opposition from worker unions.