HNHacker News
TopNewBestAskShowJobs

mwhite

-3 karma · joined October 26, 2020

http://michaelawhite.net
submissionscomments
mwhite··on Three and a half degrees of separation
Cool, but a more meaningful number concerning the original meaning of "six degrees of separation" than the average of the average of the degrees of separation between each individual and everyone else would be the average of the average of the 90th, 95th, 99th etc percentiles of the degrees of separation between each individual and the most distantly separated other individuals in the graph (maybe excluding outliers who only have a few Facebook friends).
mwhite··on Three and a half degrees of separation
That is the distribution of the average degrees of separation for each person. What would be useful is the distribution of distributions of the degree of separation between each person and every other person.
mwhite··on Show HN: Simple and elegant Markdown-based resumes
Obligatory link to my Markdown resume which converts to PDF (via LaTeX) and HTML using Pandoc:

https://github.com/mwhite/resume

mwhite··on Ask HN: How does a 1990s web developer get back on track?
I haven't made that journey, and it depends on how complicated the sites you want to "setup" are, but here's my advice as someone doing full stack web development for several years, having started from frameworkless PHP and now preferring the Single Page App (SPA) stack of Flask + SQLAlchemy + flask-restless (REST API framework) + Backbone models + React:

SPAs are only really necessary for certain use-cases, and while having a strict client-server separation does have benefits, it also incurs upfront costs.

You can still get by perfectly well generating HTML server-side with PHP or Perl and MySQL. You may want to check out MariaDB, a fork of MySQL by the original creator if you haven't heard of it. Postgres also finally just added upsert (INSERT ON DUPLICATE ...), which might be the last real barrier to migrating from MySQL, so if you don't have a ton of lingering MySQL-specific knowledge, you might want to start with Postgres, as it seems to be the default in a lot of FOSS situations these days.

There's certainly been lots of innovation in server-side web frameworks and ORMs in PHP and Perl since the 90s. I can't speak to Perl but Slim is a good PHP microframework and Propel is a nice ORM, though there are also more heavy-duty frameworks such as Laravel.

If you don't mind learning a new language, I would recommend Python for any backend web development that doesn't require squeezing out as low response times as possible, which gives you the excellent Flask + SQLAlchemy, or Django if you prefer a little more hand-holding.

You can still use JavaScript to add interactivity without making a SPA. jQuery, Backbone, and React would do that in increasing levels of abstraction.

In the grand scheme of things, the changes to HTML/CSS since the 90s have been relatively small. If you use Bootstrap you might not even have to worry about them too much.

In summary,

- MySQL or Postgres

- Generate HTML server-side starting with a PHP or Python microframework and ORM, upgrade to a batteries-included framework if you discover you need it

- Use Bootstrap

- add interactivity with jQuery or (if you want to learn it) React (React-Bootstrap is nice); switch to full SPA if you discover you need it (in that case you'll probably want react-router, SystemJS, and JSPM)

- use Heroku or equivalent to avoid system administration

- with the combination of cross-browser libraries (jQuery, React) and the latest versions of all the popular browsers having fewer and fewer inconsistencies, you actually don't need to worry too much about how to support multiple browsers unless you want to support really old browsers that only make up a few percent usage share combined.

mwhite··on Python 3.5 type hinting in PyCharm 5
For those curious, list comprehensions were introduced in 2000 with Python 2.0.
mwhite··on A Disadvantaged Start Hurts Boys More Than Girls
1 in 200 men are direct male-line descendants of Genghis Khan. Many more are descended from Genghis Khan in any path (probably all Mongolians, and large fractions, quite possibly majorities, of many Asian groups).

https://en.wikipedia.org/wiki/Most_recent_common_ancestor

mwhite··on Show HN: Metabase, an open-source business intelligence tool
Another extremely powerful open source BI solution is Saiku, based on the Mondrian OLAP server: http://www.meteorite.bi/products/saiku
mwhite··on Ask HN: What is your front-end stack of choice if you start a new web-app today?
React, react-router, Backbone models, https://github.com/magalhas/backbone-react-component, systemjs, jspm
mwhite··on The Lonely End: in aging Japan, thousands die alone and unnoticed
If the people who care about the environment don't have children, then future generations will just be comprised more of people who don't care about the environment.
mwhite··on Ask HN: Switching from OS X to Linux
Try Kupfer. Been using it for years with no complaints. http://engla.github.io/kupfer/
mwhite··on Relay FAQ: Facebook's Data-fetching Framework for React
Could you give an example of the type of bug you're referring to here?

> This means that only the fields of an object that a component explicitly asks for will be accessible to that component, even if other fields are known and cached in the store (because another component requested them). We call this masking, and it makes it impossible for implicit data dependency bugs to exist latently in the system.

mwhite··on JavaScript Modularity Shaming
Wow. I bet these could even be grouped into one module with minimal size overhead by using some higher-order functions or something.

https://github.com/blakeembrey/swap-case

https://github.com/blakeembrey/is-upper-case

https://github.com/blakeembrey/title-case

https://github.com/blakeembrey/snake-case

https://github.com/blakeembrey/dot-case

https://github.com/blakeembrey/path-case

https://github.com/blakeembrey/camel-case

https://github.com/blakeembrey/param-case

https://github.com/blakeembrey/upper-case-first

https://github.com/blakeembrey/lower-case

https://github.com/blakeembrey/upper-case

https://github.com/blakeembrey/pascal-case

https://github.com/blakeembrey/is-lower-case

https://github.com/blakeembrey/constant-case

mwhite··on Ask HN: It's Jan 1 and you're building a new Saas app: What framework do you pick?
I'm doing this right now. IMNSHO, the best stack for 99% of real-world projects is:

Database: Postgres

As the leading relational database, Postgres is a significant human achievement. It has recuperated most of NoSQL's critique in the past few years (for 99% of use cases), with the JSON types and functions, WITH RECURSIVE queries (added a few years ago, which essentially let you do anything you could do with a graph database), columnar stores, etc.

Its full-text search is good enough for many cases. [1]

Backend: Flask, SQLAlchemy, Flask-Restless (REST API framework)

There's no other ORM that's as powerful and uncompromising as SQLAlchemy.

If you use Flask-Restless to generate a REST API, you can have almost your entire app consist simply of model definitions.

Frontend JS: React with the Fluxbone pattern [2]

React is the most performant, powerful, and practical frontend framework currently available, and it's likely to be the best choice for practical development for the forseeable future.

CSS: Titon Toolkit [3]

A nice up-and-coming lightweight CSS framework with lots of components and plugins that gets out of your way. Some work is needed to integrate it with React while maintaining the Virtual DOM performance benefits of React, though.

[1] http://blog.lostpropertyhq.com/postgres-full-text-search-is-...

[2] http://www.toptal.com/front-end/simple-data-flow-in-react-ap...

[3] http://titon.io/en/toolkit

mwhite··on The Rise and Fall of Industrial Research Labs
> If you think the U.S. is in technological decline... how come oil production has drastically increased?

I read a fair amount about energy issues, but mainly for my own understanding and less so to be able to readily explain it, so forgive me if I get something wrong and for the lack of citations, but I believe it's basically that the increase in oil production is pretty much completely due to unconventional sources like shale oil (and fracking for natural gas) which have a much lower Energy Return on Energy Invested (EROEI), which means they're only profitable when the price of oil is very high.

What expecting these unconventional sources to save the day fails to account for is that they are still very finite, and more importantly, that when the price of oil gets high enough, it hurts the economy, which then decreases demand for oil, which causes the price to drop, which makes it unprofitable to operate and/or develop new unconventional wells until the price rises again due to low supply. This cycle is not really compatible with a healthy economy. We are seeing the beginning of this as we speak, with oil companies laying off people because shale oil isn't profitable at current prices.

Also, the technology for shale oil and fracking has been around for a long time, so it's not exactly technological innovation, just a new source that became profitable to exploit as easily accessible oil becomes scarcer and prices are high.

> And what sort of oh-so-important research do you think we're missing out on that could be better parallelized with more funding?

Maybe space travel?

Or viable renewable energy that could actually sustain civilization?

http://energyskeptic.com/2014/science-no-single-or-combinati... http://energyskeptic.com/2014/why-fusion-will-never-work-and...

mwhite··on Ask HN: What are some blogs of really smart people you check regularly?
http://michaelochurch.wordpress.com

http://thearchdruidreport.blogspot.com/

http://pchiusano.github.io/ (was http://pchiusano.blogspot.com/)

http://www.daedtech.com/blog

http://yosefk.com/blog/

http://oldurbanist.blogspot.com/

mwhite··on Replacing Throwing Exceptions with Notification in Validations
Exactly. This article doesn't address the fact that for most programs you ideally want to have a separate UI validation where you're dynamically validating the user input before it gets submitted, and an internal validation where you validate the data before it gets saved, but also possibly even after it gets saved, relative to pre-existing data (where you could throw an exception and abort the transaction if it didn't validate).

If you want to use some of the same validation code for user input validation and internal validation, I suppose you could modify the notation pattern to conditionally throw an exception when adding a new error depending on whether it's on the client or the server.

mwhite··on College for Grownups
I don't find it completely implausible that some people with influence in the lawmaking process (whether it be congresspeople, their advisors, or interest groups) have the historical knowledge and analytical ability to develop a perspective like Michael's.

Why should one assume that the actual reasons behind a policy are the same as the stated ones?

Even more, if these facts about the effects of the policy are true and important, then whether or not they comprise a large part of why anyone wants or says they want the policy isn't even that relevant.

mwhite··on The failed economics of our software commons and what to do about it
An alternative solution could be to innovate in licenses.

I think a lot of the problem is the idea that MIT/BSD-licensing is the ideal solution because it promotes freedom the most. Clearly, using restrictively licensed components under currently existing restrictive licenses often isn't practical for businesses, but that doesn't mean that having everything be MIT/BSD is the end stage in the evolution of open source licensing.

MIT/BSD-licensing promotes freedom for businesses, but hurts open source developers by requiring them to trust that they can be adequately compensated for their work by a reputation economy that's subordinate to a corporate system that we don't ultimately control.

What if the open source community adopted a norm of dual-licensing open source libraries with the choice of a restrictive non-commercial open source license (basically, AGPL with an added non-commercial restriction) or a license that permits commercial use if you pay?

The key would be that this dual-license would require that any derivative software also be licensed under the same dual-license.

Wouldn't that preserve freedom as in free, while ensuring that open source developers are compensated for their work at levels that ensure and incentivize an optimally robust open source software base?

The devil would be in the details but I bet there's a way to do this that preserves everything that's good about FOSS now and incentivizes better software.

mwhite··on Mozilla’s Add-on Policy Is Hostile to Open Source
To say that Firefox, one of a handful of end-user open source software packages with global reach, is hostile to open source, is absurd.

Frontend web developers are a small fraction of Firefox's users, and you can't expect them to tailor their processes and expend resources just so every niche JavaScript framework can trumpet its six-week release cycle.

For the same reason that you usually shouldn't use your distro's packaging system to install frequently changing development libraries, it makes more sense to just default to manual installation of developer extensions. You can always alert the developer if there's a new version. You may not even want the developer extensions to auto-update because then you have to include support for every previous version of your framework in each version, rather than having the opportunity to remove support for old functionality and have each extension version support only the equivalent framework version.

mwhite··on Mean People Fail
Can you expand on why you think Tom Preston-Werner is mean? From all I've seen he appears to be a good person.

GitHub reached 150 employees without having anyone quit, which hardly seems likely if the Founder and CEO is mean.

https://twitter.com/holman/status/303576839132164097

mwhite··on Show HN: Dating Ring (YC W14) – We do the work, you do the dating
What is a feminist company?

Given that 'feminist' and 'feminism' are used by many people to mean many different things, it would be nice to specify what being a feminist company means.

Is it just a company run by people who self-identify as feminists, maybe one that only hires other people who self-identify as feminists? If so, how do you enforce this? Or is the company's feminism defined by specific policies that are based in a specific meaning of 'feminism', and if so, what are they?

mwhite··on Show HN: Put “GIF” in front of any YouTube URL and hit enter
There seems to be a bug where if you try to create a gif at the same starting point but with a different length than one you've already created for the same video, it only ever returns the original length gif.
mwhite··on SQLite vs MySQL vs PostgreSQL
For a quite in-depth comparison of various RDBMS, check out http://troels.arvin.dk/db/rdbms/
mwhite··on Julie Ann Horvath Describes Sexism and Intimidation Behind Her GitHub Exit
My apologies, I clearly didn't search well enough, and in retrospect it probably wasn't even worth saying anyway.
mwhite··on Julie Ann Horvath Describes Sexism and Intimidation Behind Her GitHub Exit
Well, there are only three Github founders, and a quick search seems to indicate that Tom Preston-Werner is the only one with a wife, Theresa: http://techcrunch.com/2013/11/27/omakase-charity-tech-indust...
mwhite··on How times have changed for PostgreSQL
Salesforce does this: http://www.dbms2.com/2011/09/15/database-architecture-salesf...
mwhite··on How times have changed for PostgreSQL
You could use a Postgres JSON or hstore column for the custom variables. If you use a JSON column, and want to do queries on the custom data, try out this tool I made for creating views of properties within a JSON column: https://github.com/mwhite/JSONAlchemy
mwhite··on Flask API – Browsable Web APIs for Flask
What about using Swagger[0] with flask-restful-swagger[1]?

[0] https://helloreverb.com/developers/swagger [1] https://github.com/rantav/flask-restful-swagger

mwhite··on Regulate the Internet like the real world or the real world like the Internet?
What's the review site? I won't tell.
mwhite··on Go by Example
Hey, don't sell Python short!

    vs.sort(key=len)
← PreviousPage 2 of 4Next →