< Back to the archive

Like what you see? Subscribe here and get it every week in your inbox!

Issue #10 - May 12, 2019

Here are the top threads of the week, happy reading!

Top comment by DoubleGlazing

Being able to sell and do the whole business BS thing is vitally important. If you can't do it, hire someone or get a friend/relative to help.

Under promise, over deliver. (slightly)

Become an authority on your subject matter. Write blog posts, post often on twitter, write to journals/newspapers - set yourself up as someone who knows what they are doing.

Charge for spec work.

Don't be afraid to turn down work that may challenge you more than you can handle. You are taking an unnecessary risk. In those circumstance you can offer to help the client find the right consultant/solution provider.

ALWAYS get a deposit before work begins. And then insist on regular payments for longer projects - if payments stop, you stop work.

Don't do fixed fee work, unless you REALLY, REALLY trust the client.

Good relationships are vital. If a client likes you they will market you through word of mouth and that's the best kind of advertising.

Have a plan in place to deal with non-payments or difficult clients. Be consistent and don't let bad clients take advantage of you. Offer no credit terms longer than 28 days. Offer a 5% discount for quick payment.

If you are providing software before full payment is received, don't be afraid to use a licensing mechanism to shut it down if payment fails to materialise. A friend lost €20k in a similar situation.

Also, bear in mind you will work long hours. That's why I couldn't keep doing it. I was making decent money, but the hours, and travel, were killing me.

Top comment by walterbell

Please, please tag each batch of books with a unique lot number, so they can be associated with a specific estate or deceased bookstore. One or more humans spent a lot of time curating those collections. If one of the lots was well curated, then anyone who finds a book that they like will want to see the other books in that lot.

Source: people who have spent years trying to find the names of the 8,000 books in R.A. Lafferty's personal library, lost after he died. About 300 title names have been recovered, https://www.ralafferty.org/tulsa-books/

Top comment by liyanchang

I've been really happy with how my current company[0] has been doing migrations and I've seen a couple others do it but it seems like it should be more widespread.

Database Schema as Code

Instead of writing up and down migrations, you define what the end state should look like. Then the computer will figure out how to get here. This is just how the industry started managing server configurations (Puppet) and infrastructure (Terraform).

We use protocol buffers so it was pretty straight forward to have a definition of what our tables should look like. We have a script that figures out what the delta is between two states (either proto files or a db) and can calculate the schema migration SQL (e.g. CREATE TABLE, etc).

From there, we run it through a safety check. Any unsafe migration (either for data loss or performance issues e.g. DROP TABLE) requires an extra approval file.

There's no real difference between an up migration and a down migration (except that one tends to result in an unsafe migrations). It's calculable at CI time so we can give devs a chance to look at what it's going to do and approve any unsafe migrations. API compatability checks enforce that you need to deprecate before you can drop.

DML, that is data changes, are handled via standard check in a sql file and CI will run it before the code deploy and after the schema migration.

Alembic is the one other place I've seen this concept (a couple others mentioned this) so it's not new, but surprised I haven't seen it more places.

[0] Shameless plug: We're hiring if you're interested in changing how healthcare is paid for, delivered, and experienced. https://www.devoted.com/about/tech-jobs/

Top comment by mattlondon

This happens all the time I've found, particularly in "agile" processes. You are coding away implementing something and realise there is some corner-case or edge-condition that was not considered in the original design and/or UX spec. Stuff that only becomes obvious once you are staring at the code you've just written and are thinking "What should we do if this is null?"

So you unilaterally implement something to handle that condition.

Especially in agile projects with tight deadlines and the idea of continual refactoring etc, rather than block further work on that feature while you wait for the product owner/business analysts/UX team/etc to come up with an answer and get back to you, you check-in your "best guess" implementation and move on, with a TODO or bug left open to revisit it.

A lot of the time (maybe 75%+ in my experience) the developer's instinct tends to hang around as the final solution, even if the developer is not an expert in the context of the users of the application they are writing (this is rare in my experience - generally developers are developers, and not likely to coincidentally be experts in the subject area of the application's use cases unless it is some niche areas - e.g. people writing software for surgery robots are probably also unlikely to be expert surgeons too I would imagine? Not impossible, but I'd want people to be an expert in surgery robot programming, or an expert in surgery and not a half-arsed kinda-ok-done-a-bit-before level of skill in either area!!)

Top comment by bazza451

Testing is valuable but my opinion of it has changed over the years.

On a new/fast evolving product I prefer to have a solid suite of integration/e2e tests and a lighter unit test suite near the edge of a server with no mocking of deps (e.g. if it uses a db, spin up a local instance). I would also test something that is non-trivial to understand or a critical dependency in the system e.g. a rules engine.

The reason being is - the code is in so much flux that the internal interfaces change constantly. In agile new requirements come along and you end up chucking a lot of the old code out of the window and wasting time.

As you move towards completion of the project and the internal interfaces shore up then increase the tests. So when it’s in maintenance mode someone else can easily make modifications and has documentation on maybe why something works in a certain way

Top comment by majkinetor

Don't look any further. Calibre FTW.

Some features (there are thousands of them):

- You can make plugin for any magazine (python) including self-published

- You can scan books for ISBNs and get certain 1 on 1 match online without any effort or search foo. Without ISBN it will search by given criteria

- Batch operations for everything

- It first uses cover of the book (first page in PDF, epub etc), downloads covers if there aren't any, or generates them if nothing can be found

- You can add arbitrary metadata and give them types (bool, text, urls...)

- You can share via web server and access lib from browser and even add books from browser or simply copy them to special folder

- Its x-platform

- It supports zillion formats, and basically you can add zip or anything. Audiobooks could be handled better but ok.

- Its updated weekly for years

- You can have different libraries, groups, virtual libs etc.

- Awesome converter from-to number of formats

- You can both have online tags applied and your own tags. I have personal tags such as `reading`, `must read` etc. along with my own classification on books that isn't merged with online stuff and is kept separatelly.

- Awesome ebook reader

- Many more options

- There are plugins to put kindle encrypted books offline !

Simply, there isn't anything better out there. Anybody not using it simply doesn't know better.

The only thing it doesn't have is in text search, but hey... I am sure its comming one day or you can implement samo mumbo-jumbo on your own.

NOTE: Calibre is IMO not that good for research papers although YMMV. Zotero might be better choice for this.

Top comment by arthev

I went with Wordpress after a blogging guide suggested to minimize time spent messing with the blogging software, because messing with blogging software isn't blogging.

Top comment by s_dev

This seems really odd for Hacker News. This isn't what the site is for -- besides theres little help available here because this could easily be a scam as are all "cries for help" on the Internet and mods should take it down.

Top comment by gshdg

If you're not even getting interviews, take a hard look at your resume. The resumes I get from India (and from H1Bs looking to switch jobs) are very different from those I get from European and American candidates. They're dense, verbose, and describe hiring requirements rather than results.

Also, if you're submitting 50-60 applications at a time, you may be spamming, which only annoys hiring managers. You'll get better results from fewer applications with both resume and cover letter carefully tailored to the company and position.

This is especially important when you're applying remotely from India, because hiring managers get glutted with spammy and irrelevant resumes from there. If yours looks exactly like the resumes of the hundreds of developers who've created scripts to auto-submit to every listing on Indeed with the terms "Python", "Java", or "C#" in them, it won't even get read.

Top comment by ZeroGravitas

The evidence based advice from Dr Stuart McGill is right up HN reader's street.

An actual academic who takes a rigorous, logical approach to identifying and remedying back problems while also addressing very down to earth issues like how best to sneeze, tie your shoelaces or or lift light objects from the floor in the best way possible for your back.

He's got some books, I've got the one called "Back Mechanic" which I highly recommend and you can find him mentioned in various blogs and YouTube channels.

He also does work with high end athletes, powerlifters etc. which may be of interest to some, but I found too much of that kind of thing while researching and it was his more down to earth advice that I found very useful. In particular his "McGill big 3" excercises for strengthening core back muscles.

His website is a little cheesy but don't let that put you off, lots of great info in his books.

https://www.backfitpro.com/backpain/

Also, walking (though McGill has some more specific hints on walking posture).