HNHacker News
TopNewBestAskShowJobs

elnygren

627 karma · joined January 26, 2015

submissionscomments
elnygren··on Hacker News Clone Using GraphQL and React
It's certainly doable and has been done. However, it's not as pretty as the rest of GraphQL and there's still a lot of work to be done.

And comparing to something like Django/Rails - there's a lot more DIY involved.

elnygren··on Hacker News Clone Using GraphQL and React
Actually, my point was about losing control over queries when using JoinMonster (say, you wanna do something fancy like Postgres' to_json, array_agg that JoinMonster doesn't support).

However, I totally understand the confusion in my sentence and actually this thing you're talking about is also useful to me :)

elnygren··on Hacker News Clone Using GraphQL and React
GraphQL is a very nice spec for building APIs that have many sources of data and then building a modern frontend with proper caching etc. on top of it.

The ugliest part of it, or one requiring most hacky solutions, is optimising queries. For example, there are some nasty N+1 traps or "oops-I-joined-your-entire-database" problems when using SQL.

JoinMonster helps with this, but it is a bit too much of a "full solution" or framework to just quickly use. You'll also lose a lot of control over your queries which was a big reason for me to move from Django/Rails/etc. style tools to trying out GraphQL.

This project seems to avoid databases entirely and it seems to have an N+1 queries problem when fetching comments. Each comment is fetched with a separate API call and a single HN Post can easily have hundreds of comments... even if cached, this is a problem.

The SQL "WHERE IN (list of IDs)" query combined with smart caching and batching (see: Dataloader by Facebook, JoinMonster) is a decent solution but requires some amount of good old manual work.

tldr; GraphQL is nice but has its own set of problems. Still no magic bullets.

elnygren··on Why Does Sweden Have So Many Startups?
Well if you can't get out of the building and you're losing focus to all that useless stuff lying around in your office... ;)
elnygren··on Why Does Sweden Have So Many Startups?
Thank you :D
elnygren··on The SEC has charged two initial coin offerings with defrauding investors
Well it was about the damn time! A lot of ICOs are borderline (or just straight) scams. There have been even cases where the ICO funds have been "stolen" but rumours say the founders just took the money and ran.

A lot of the so called "products" and "businesses" pitched by these ICO companies are just well known already working models somehow forced into the blockchain with the only reason being the ability to do an ICO (and generate an absurd amount of money for the founders).

Another common feature of ICOs: there's never any equity on the table. The founders are gonna cash in on the ICO and then later do an exit (sell the company, IPO, whatever). ICO "investors" are not gonna get much for their money here.

At least during the dotcom bubble some companies made it and the investors then got real equity for their money.

elnygren··on Why Does Sweden Have So Many Startups?
I'm Finnish (the lang is nowhere near English) and I've begun coding in my early 20s and I'm a technical co-founder (who actually knows his stuff). I don't think language is the reason here.

Good education, smart people, good safety nets and a culture of doing things well & properly are IMHO better explanations.

About the culture thing: go to anywhere in Europe/World and you'll find out that the Nordic countries in general have very clean cities and all broken things like door knobs etc. are replaced faster. Design & architecture is very simple, functional and there isn't much "kitsch" to be found. I'd say this helps in startups too: you'll find people who really want to do their job well and build a solid product.

elnygren··on Why Does Sweden Have So Many Startups?
The statement "Country X has a lot of startups" also applies to more or less any Scandinavian country (and Finland, which isn't part of Scandinavia but part of the Nordic countries).

One thing to note about Norway: they might not have the same urge to create startups as they already are among the wealthiest countries in the world thanks to their very wisely spent oil reserves.

elnygren··on Privacy
iOS saves space by only keeping thumbnails locally and loading better versions on de-mand.

You’re gonna be fine :)

elnygren··on Sublime Text 3.0
Visual mode is slow and awkward compared to what ST can do with cmd+D, for example.

IME, vim actually loses in performance too when editing multiple lines.

elnygren··on Curl’s backdoor threat
Agreed. However, this is unfeasible/impractical. Ain't nobody got time for that.

Are there any commercial or non-profit organisations that maintain lists/repos of audited and trusted software with their checksums? It seems like there would a demand for a package manager like that.

I suppose some Linux distros have pretty OK repositories?

I wouldn't trust npm, pip, gem etc. though.

elnygren··on Publishing with Apache Kafka at The New York Times
so how does that one-liner transform data from log A to log B in realtime?

are talking about creating a new table or materialised views or stored procedures or...?

elnygren··on Publishing with Apache Kafka at The New York Times
Postgres could in fact be used here by creating an append-only table similar to:

id, data (JSON field)

However, Postgres doesn't have good support for creating derived append-only logs (=streams) from that table. Kafka has Kafka Streams and KafkaSQL. And producer+consumer APIs that are a good fit for NYTs use case.

> Am I missing something?

Remember that in addition to schema changes, NYT also wants to avoid row changes. One reason was that all search indices & other systems need updating too during a row change in a DB and this will lead to inconsistencies in large scale (sometimes some of these updates fail).

IMHO the thing you are missing is the log based architecture where all databases are derived/materialised from the SSOT: the log.

elnygren··on Publishing with Apache Kafka at The New York Times
if you read more closely, this article is not about the amount of data, but the way how it is managed.
elnygren··on Publishing with Apache Kafka at The New York Times
> Kafka messages are immutable. Each of those green boxes on the right hand side of the first diagram will need to have special-case logic to unpack the kafka stream, with knowledge of its changes (up until 17 May 2017, treat the data like this, but between then and 19 May 2017 do x, and after that do y).

One solution would be:

Kafka allows you to easily create new streams from the "monolog" stream that normalise the data to a certain schema. Consumers can then just consume these new derived streams.

Another was mentioned in another reply (create a new stream that ultimately replaces the monolog).

> Document pipelines is a rare instance of a context where XML is the best choice.

XML does not really offer anything here that could not be achieved with tools that are nicer to work with? It's just a file format, basically. Why wouldn't Protobuf work? It also saves a huge amount of disk space vs. XML.

> Secondly, they should have a gateway coming out of the file store. For each downstream consumer, they should have a distinct API.

This is Kafka. They can have distinct streams for the consumers since you can always derive new kinds of streams.

> You shouldn't use it as a long-term data store.

Why not? Kafka has support for infinite retention and Kafka has very strong guarantees about always writing data to disk and not losing a single event.

elnygren··on Afraid of Makefiles? Don't be
I almost always roll a basic Makefile for even simple web projects. PHONY commands like "make run" and "make test" in every project make context switching a bit more easier.

While things like "npm start" are nice, not all projects are Node.js. In my current startup we're gonna have standardised Makefiles in each project so its easy to build, test, run, install any microservice locally :)

elnygren··on A Solution of the P versus NP Problem?
There's really nothing there - 11 likes and 1 comment ?

Also, this very same Facebook link was linked to at https://cstheory.stackexchange.com/questions/38803/is-norber... by https://cstheory.stackexchange.com/users/24/opt

Neither this HN user, that FB user nor that stackexchange user seems like anyone important, respected or relevant in the field of CS of this article (correct me if I'm wrong).

Smells like a bad attempt at karma whoring to me.

elnygren··on The ethereum “hacker” didn't hack anything
It seems we have some mismatch between the abstraction layer where we want to talk about cryptocurrencies and how their actual implementation goes.

IMHO, we are venturing to the domain of lawyers; most people are not just going to be saying computer code == what-we-agreed-here because most people are just normal people and they couldn't care about computer code. And let's face it, cryptos are already full of normal people, it's not for the early nerds anymore.

However, always keep in mind that cryptos are not regulated, they are not always too compatible with current regulation regarding normal money and they are extremely valuable when considering the fact that they are not regulated.

elnygren··on Update on Bitcoin Cash
Not quite like a stock split. In stock splits its almost guaranteed that the total valuation is similar.

This is wild, wild cryptoland. At the moment both Bitcoin and Bitcoin Cash are rising - so a lot of "free" money (at least in the short term.).

For now, two coins is better than one :p

EDIT: allright, Bitcoin Cash has been declining for a few days now. However, it still has quite a bit of value that has not disappeared from Bitcoin's value.

elnygren··on Update on Bitcoin Cash
Well, at least they have the best appearance.

As in, UX, UI, Docs, APIs, service design etc. are all top notch. Which would make it probable (but not certain) that the more technical parts are well engineered too.

Coinbase is doing perhaps something similar to what Stripe did for its field of business.

elnygren··on Update on Bitcoin Cash
> without keeping references/keys to the old ones

You are correct, but this would be a new level of stupid for a leading cyrptocurrency exchange that actually tries to build a reputation and appearance of quality, safety, compliance and being a "legit" service for financial institutions etc.

elnygren··on Clojure-turtle – Logo programming language in a Clojure context
Using Clojure as the first language is interesting. Being one of the most expressive and efficient (I am not talking about clock cycles here) languages I've used, I think it will set a great mindset for programming.

Clojure is declarative, you tell what you want, not how you want it. It uses immutable data structures and functional programming. It teaches you a sane, safe and beautiful way of working on the problems rather than working against/around/because of your language (e.g building OOP design patterns rather than just solving the problem at hand).

Some people might disagree, but Clojure is a very hands-on and practical language. There's not much syntax or quirks to learn; just a big standard library of very useful functions for processing and transforming data.

elnygren··on Employees Who Stay in Companies Longer Than Two Years Get Paid 50% Less
Best way to increase salary at current workplace? Get offers from other companies & ask for a meeting with your boss (or whoever decides your pay, so HR etc.).

Bring up the offers, discuss what you'd get from there and also go through the potential career you could build at those companies. For example: Consultancy X would pay me $k/mo and every 6months it will go up the ladder if I perform well.

With this kind of discussion you should be able to get a raise that brings your pay even above the competing offers.

Treat your current as one of the options you can make that day; make your employer fight for you every 6-12 months. And remember it's not personal, it's just business. Your employer would let you go and throw you under the bus if it made business sense.

tldr; don't get too emotionally attached to job; that's when they get you.

elnygren··on How I Took an API Side Project to 250M Daily Requests
The author says I took even though this was pure luck and coincidence. Attribution bias is strong in this one.

However, it is important to acknowledge that he did put himself into a position where he was available to become lucky (= he built the API and linked to it).

elnygren··on Using Tensorflow to Recognize Saimaa Ringed Seals from Webcam
It was a good run while it lasted!

In case you guys have ideas for other similar ML/AI projects - we could take a look!

(shameless plug, I'm a partner at Emblica.fi)

elnygren··on Ethereum crashed from $319 to 10c on GDAX after ‘multimillion dollar’ trade
It takes two to tango.

A lot of people lost a lof money because they got margin called at ~$2 for a commodity that is worth ~$300.

https://twitter.com/elnygren/status/877660177406865408

On the other hand, a lot of people made a lot money since there are buy orders that wen through at less than 1% of the real price.

elnygren··on If you can’t explain something in simple terms, you don’t understand it
"had I more time, I would've written a shorter letter".

Remember that "in simple terms" does not mean easy or over simplifying something. To me it means making a to-the-point and jargon-free explanation.

elnygren··on Switching From React To Vue.js
I've done some work on Riot actually!

If you like them, check out RE:DOM - the author of that one did some work on Riot too.

RE:DOM might be even more minimalistic and lightweight than Riot.

elnygren··on Switching From React To Vue.js
Vue and React both seem a little too heavy in boilerplate. It's also interesting that Vue seems to think that mutable state is a good thing (well, vanilla React does have mutable state too...).

For the boilerplate (and large bundle size!) problem we have http://markojs.com that looks very interesting.

However, I think what we really might want is something closer to ClojureScript's re-frame (https://github.com/Day8/re-frame) and Reagent. However, Clojure and it's tools aren't really that great for beginners/juniors and/or people with little experience in FP and lisps.

Maybe in the near future we'll see a little bit more FP style JS solutions pop up?

elnygren··on DevOps is a culture, not a role
Yes yes, we get it, it's a mindset not a role. Now could we hire a DevOps guy to setup that CI/CD pipeline, ChatOps stuff, Kubernetes and dev/staging/prod flow so the coders can ship. ;)

The original thought was beautiful but the way I see it: DevOps is a branch where you specialise. After school people might learn front/back/db stuff and then specialise to "DevOps stuff" -- or then you have more sysops kind of people who start to venture in the land of automating their work. Both are needed imho.

← PreviousPage 3 of 4Next →