Lurker News

Comments (174) 54 threads

tpetry7 replies#
In isolation because of Corona last year, I started to share many lesser-known database tricks I know on Twitter (@tobias_petry). Although I thought that only a few people would be interested in something like this, it became a matter of course over the months. Meanwhile, thousands follow me to read my database tips or news.

Since every message in the constant social media stream vanishes after a few days, I had to do something about it. Knowledge must be preserved. I sat down for a few weeks and reworked every example and every text to create an ebook that you can read in an evening and still impart tons of knowledge.
And so "Next-Level Database Techniques for Developers" was born.

tuukkah2 replies#
May I suggest providing a sample chapter before requiring an email address?

EDIT: There are 10 sample pages (images) but on Firefox they are so small you might not notice them. The pages are in a row flexbox container which on Chrome overflows with a scrollbar but on Firefox scales all the way down to fit everything in view at once. Please add "min-width: 45%" in addition to the "width: 45%". Accessibility would also require links to the textual versions.

copperx1 reply#
Don't we all have burner addresses? I mean, even Apple provides them.
pmontra1 reply#
Mailinator, but the free plans have no attachments.

Continue this thread — 1 reply

qup1 reply#
It's a 50-page book. If you actually look at what's presented on the landing page, three of the topics have the entire page shown, so you can see exactly what topics will look like.
courgette4 replies#
I agree, I had a good idea of what you proposed just sliding on my phone.

Let me give you an email in exchange of that bag of tricks.
Out of curiosity: what’s happening with the email? ( out of honesty: you will get my spam ridden gmail ;) )

Continue this thread — 4 replies

sakopov1 reply#
This looks awesome! Thanks for sharing this! Mind me asking what you used to write this ebook?
tpetry2 replies#
Gmail now started to classify the email with the ebook attachment as spam. After having worked without any problems before. I am now changing my code, give me a few minutes.

Fixed

tomrod#
Worked flawlessly just now.
muhehe#
Really wonder how you "fixed" Gmail :).

Anyway thanks, it's great.

mooreds#
Thank you! Writing a book is hard work, esp a technical one. Thanks for sharing your knowledge.
sneak1 reply#
Decrease is misspelled on p48.

Columns is misspelled on p33.
You may wish to run a spellcheck to find the others I didn't.
My disposable email I used to sign up has already been nullrouted. Rather than tit-for-tat collecting PII, why not just publish it to the whole web without the extra hoops? I'd have already sent you a PR in that case with more copy edits.

javajosh1 reply#
It's not about PII, it's a comms channel to db pros. And yes, a good email list like that is quite valuable, and he wouldn't get that just sharing the resource as you suggest.
hgrth6644fd23#
A whole bunch of burner addresses of people who are hoping to one day be db pros must be REALLY valuable.
dev_dude#
Thanks for all the valuable tips.

It's amazing every time how much load a properly configured database can reduce.
Especially the tips for optimizing indexes are very good. "Partial Indexes for Uniqueness Constraints" is my most favorite.

elric#
@tpetry: I enjoyed reading the book. Could you please have it added to the Goodreads database so I can leave a positive review?
pashabitz4 replies#
A person gives you a whole book they wrote for free and you're complaining about asking for an email? WTF
pubby3 replies#
It's not exactly free if they're asking something in return.
selykg1 reply#
I only have like a dozen email addresses. Several of them are for junk mail and subscription type stuff. Do you... not have a junk email address? I would strongly encourage you to start on that, because, even just a stupid gmail account you never use for anything important but use for junk is probably a life changing situation for you if you've never heard of doing something like this.

Edit: Super power here is setting up a 1Password Identity (or whichever tool you use, hell, even a snippet) to auto fill junk email in when signing up for stuff vs not-junk email. I have three identities. One for work, one for personal, one for junk. Makes this stuff super easy and fast.

pubby#
I wasn't trying to make a point about price (e-mails are practically free). The book could cost half a penny and my comment would still stand. People just view items that cost something differently than genuinely free items, and not in a rational, economic way.

For example, see: https://www.npr.org/sections/money/2012/07/13/156737801/the-...

nabakin2 replies#
YouTube asks you to watch ads, but we still consider it to be free. Many mobile games make you create an account (and provide your email) before you can play but we still consider them free because you don't have to give any money. That's the definition here: don't have to pay money = free. This ebook is free
varispeed4 replies#
You don't value your time = free

Other people do value their time, therefore it's not free for them.

Continue this thread — 4 replies

rvba#
Hackers from "hacker news" know how to install adblock, so they dont have to see ads on youtube.
RavingGoat#
If you're not technical enough to have a junk email address then you probably aren't technical enough to learn SQL tricks.
evilduck2 replies#
Because I weigh the potential of being marketed to by email as being a negative value greater than the potential positive value of the information provided in exchange. 'Free (with the potential to spam you later)' is a world apart from 'Free, gratis, enjoy'.
FooBarWidget2 replies#
The author loses much more than you. You can always unsubscribe, or — if you don't trust unsubscribe — filter away his emails. From the beginning you were always in full control. Giving your email grants the author no power over you whatsoever.
marktangotango#
You are being down voted because this is a shallow view. The expression of interest tied to an identity has value. For proof see Google, Meta, Amazon, and Facebook earnings.
Terretta1 reply#
Nope, they can sell the list (or have it hacked), and then YOU are screwed.

Continue this thread — 1 reply

christophilus#
Wildcard emails for the win.
scrubs1 reply#
Agree. The guy provides engineering know how and we're pigeon dropping all over it for bureaucratic dorkish nonsense? You gotta have an attention span that separates noise from value
lojban42#
Vocal minority.
kretaceous1 reply#
Yeah, I was sad seeing some of the reactions. To each his own. For a student like me, I would gladly take a free resource and won't mind the newsletter.

Maybe OP can also put a donate button for people who don't want to provide their E-Mail and get the book.
Thanks a lot, tpetry!

hgrth6644fd232 replies#
The criticism is that it's not honest. "For free" is not correct. It's "book against harvesting your contact data". If that's what the first page would say, then it would be honest and nobody would be upset. But acting as if it's been "published" out of pure altruism is just misleading people, and they are righfully pointing that out.
enraged_camel#
I took it to mean “free as in beer”
yakshaving_jgt2 replies#
Would you pay money in lieu of providing your real email address? If so, how much?

Continue this thread — 2 replies

mdip2 replies#
I haven't read the whole thing but I really enjoyed the introduction and agree completely. The RDBMS I've spent the most time with over the years is Microsoft SQL (immediately when 2000 was released) and over the years I've been surprised by two things: (a) How many developers that work with databases every day yet haven't the foggiest idea how to do anything the GUI tooling doesn't handle "easily" and (b) How quickly a developer can go from zero to "able to keep things performing well for all but the ugliest scenarios" knowledge-wise.

I've watched that last part unfold on many occasions. Usually I'd be brought in because the developers have done everything down to "copying the data to denormalized tables[0]" to try to sort out slowness. Most of the time, just "blindly investigating the schema" will turn up something frightening that the ORM did, or a mess of inappropriate indexes. Two indexes on a table used by nearly every query in the database caused 30 second requests to yield sub-second results in one case[1]. I'm never willing to walk in and promise that, but I can't think of a time it hasn't happened when similar circumstances were presented to me.
So if you're dragging your feet about learning SQL, take this as my encouragement: it's one of those things where the rewards come quick and the effort is far less than you probably expect.
[0] ... with a broken sync process that has to be run carefully b/c it hammers the already over-sized database every time it fires.
[1] If memory serves, it was an account table ... used a GUID between the app and the database, but primary key was an integer auto-incrementing field which was used as the FK to other tables. All I remember was adding a unique index to the GUID field and including the e-mail address/name columns which were included in every query. Ran the fix in production and it felt like "the dam broke".

rudasn#
The last few years I've been working on a fairly big django project written by someone learning the problem domain and python/django at the same time.

I have a lot of similar stories and I you are absolutely right to encourage people to learn the basics, at least (looking at you, indexes and perf tools).
We're talking about having our cpu hitting 80-90% and rising internal temperature to 70-80C, while executing a task thats normally performed tens or hundreds of times during the workday.
A couple of carefully planned indexes, a bit of sql shuffling, is all it takes sometimes.
The upside of working with cheap bare metal servers is that you catch these things early on (5 concurrent users and your server is toasted). Fun times.

proto-n6 replies#
Can you recommend some resources to achieve (b)? Just basic stuff without going full guru on every little detail.

Or do you just mean using indexes basically? I'm just not sure how many unknown unknowns I have wrt sql.

Continue this thread — 6 replies

Continue this thread — 2 replies

Load more comments