Hacker Newsnew | past | comments | ask | show | jobs | submit | aivarsk's commentslogin

This is a good talk about SOLID https://vimeo.com/157708450


A must-read before diving into asyncio:

Async Python is slower than "sync" Python under a realistic benchmark. A bigger worry is that async frameworks go a bit wobbly under load. https://calpaterson.com/async-python-is-not-faster.html



SQL is complete but ugly: everything is expressible, but nothing is reusable; simple ideas are complex to express; the language is verbose and lacks smart defaults.

It begs for examples of the ugly/verbose/complex SQL and the beautiful/succinct/simple Malloy. Looking at the samples folder did no work for me.


Without speaking to the merits of Malloy

Think of a sales orders table. Think of all the orders in there that should be considered "invalid" for some reason or another.

It would be awesome to define some logic, one time, in one place, for "invalid orders" and then have end users be able to say "from invalid orders", "stores having no invalid orders", "customers with multiple invalid orders", "top 3 reasons orders are invalid" ...

And of course "valid orders" might just be defined as "not invalid orders"

Instead this is probably multiple views, CTEs, UDFs, and still some logic in the main query to handle NULLs or joins or whatnot.

Even little things like hierarchies - I don't want to have separate sprocs for salesByCountry, salesByRegion. salesByState,and then an umbrella dynamic sproc to figure out which one to call.

It's ironic because SQL is such a human friendly declarative language that it has such poor ability to create meaningful shorthand expressions.

I've written SQL for nearly 30 years, I love it, but natural language transpilers have shown me some of its limits as an expressive tool.


This is the use case for a metric store. https://blog.transform.co/history-of-the-metrics-store/

It's a separate system, which has downsides. As an upside, by being a component of your system, the integrations with monitoring, alerting, quality checks, and dashboards is usually pretty easy.


Yeah I don't believe in a separate metrics store (or feature store - and I sell one!)

It should all be in one SQL-like DSL with a natural language transpiler on top.


Can you recommend any good implementations of the ideal state? I worry that SQL is too much to learn, but natural language is way too ambiguous to map to anything resembling logic. (The best we can do, for natural logic -> executable logic is legislative code... And the ambiguity there is famous.)


Indeed, and i'm not buying the "nothing is reusable". Sql views are in my opinion the opposite, as they make every query reusable.


Unlike functions, views don't have arguments you can use to change the output.

(Edited for clarity.)


Yes they do, you can use them as the source for any sql query, so they have the exact same argument options as tables.


the downside with views it's that they are persistent so you can't reuse it only in the context of one connection

you can use CTEs but only with one query


> persistent so you can't reuse it only in the context of one connection

Don't e.g. Postgres temporary views cover this case?

"Temporary views are automatically dropped at the end of the current session."


¯\_(ツ)_/¯

I expect vendor specific stuff called something along the lines of temporary view would do this, yes


Agreed. I'm not a big fan but the Coffescript docs do this beautifully. https://coffeescript.org/#overview


Having worked in a Coffeescript codebase for the past couple of years, its horrible to read. It just turns into a giant mess with multiple layers of nesting and everything just kind of mushed together. Coffeescript looks fun to play with, but having it in a large production codebase is an exercise in confusion and frustration. It lets people be clever with their code. Don't be clever.


I think they were talking about the comparison, not Coffeescript itself.


The size of Thinkpad series T*s - 14". I had T460s, T470s, T490s and currently using T480s.

I picked the wrong CPU for T490s and it fried two keyboards: several keys on the right including enter and backspace stopped working after ~6 months.


Not mentioned by others, http://atlantic.net starts at $5 a month. DigitalOcean has a similar offer with much better documentation. I run a couple of larger servers at DigitalOcean and am really satisfied with uptime, management console, etc. So my vote goes for DigitalOcean.

But Atlantic had a 256Mb RAM, 10Gb disk option years ago for just $0.99 I still have one server there for hosting static HTML, running some scraping tasks, MS document to PDF conversion service (Python Twisted) for a customer, etc. All that for just $1.20 a month (including VAT)


If you're looking for a cheaper alternative then https://clusterhat.com/ is worth taking a look. I have one sitting on my desk (4 Pi Zero nodes and Raspberry Pi 2 controller).


Very cool, Thanks for the link. Are you also running k8s on it?


Other languages have other backdoors like Java's sun.misc.Unsafe which is used in many projects to get better performance.


I work from home 1-3 days a week. I'm also father of 3 boys (2, 8, 10) and wife is working full-time.

My only setup is my ThinkPad T450s. That's all.

At some point in my carrier I used 4 monitors, specific low profile keyboards and mice at the office but I don't miss that. It took some time (years!) to adjust my workflow to a single screen and maybe I'm not as productive as I could be but I'm still among the most productive employees at my company.

What I achieved is that I'm equally productive and +/- comfortable anywhere: at work, on the couch or office room at home, on a train, at airport, in the garden, anywhere. That consistency is more important to me than maximum efficiency.

So that and I choose what kind of tasks I work on when I'm alone or when family is at home because you can't expect to fully isolate yourself.


They should try to force this CoC into Linux kernel :-D


Oh god I want to read Linus' reply :D Better than a Netflix subscription for a year or so.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: