
Ask HN: How much coffee do you drink as a programmer? - bor100003
After resisting for years buying a coffee machine, I finally got one. At work I&#x27;m drinking 2-3 a day but staying at home all the time seems to make me drink more. 
How much do you drink? What&#x27;s your normal intake?
======
mfontani
A while back (couple years) I started tracking how much coffee I drank, and
(roughly) when.

I created a simple Mojolicious webapp, putting data on a SQLite database. I
later expanded it to accept/use an "API key" with which I could track my
coffee intake, or get how much I drank already and when was my last cup,
"simply" by running a simple bash+curl script. The site, instead, displays a
neat github-commits-like chart[1] and some recent stats. I have a branch which
changes the code to work on Postgres and is deployable on dokku, but I've not
yet made the switch to that. I'm still using a mojolicious+sqlite+hypnotoad
process running on a cheap VPS.

Since I started tracking my intake, it looks like I drank, on average, 3-4
coffees per day:

    
    
        sqlite> select (select count(*) from intake)/(select julianday(max(time_t)) - julianday(min(time_t)) from intake);
        3.7864677548175
    

Here in Italy's northern region, the quarantine started region-wide on the 8th
of March.

    
    
        sqlite> select (select count(*) from intake where time_t > "2020-03-08")/(select julianday(max(time_t)) - julianday("2020-03-08") from intake);
        4.20309898028925
    

It looks like I'm drinking a bit more coffee than the usual, but surely
nowhere as near as my most intake:

    
    
        sqlite> select date(time_t) as ymd, count(*) as cnt from intake group by ymd order by cnt desc limit 5;
        2018-05-16|11
        2018-03-12|10
        2018-05-15|10
        2018-02-07|9
        2019-06-04|9
    

Hope it helps! :)

[1]: [https://i.imgur.com/c0DqAGO.png](https://i.imgur.com/c0DqAGO.png)

~~~
geoah
That is amazing. Do you happen to have published the source for this
somewhere?

~~~
mfontani
I need to clean a few things up before being able to do so, chief among them
my initial rookie mistake to name the users table "user", which in retrospect
wasn't a good idea when moving the thing to Postgres - so while I've got a
neat little "migrations.sql" that has served me fine over the various
versions, it just can't work when ran against Postgres.

I'll fix it up in the next few days and will reply in a comment once it's
available.

------
michalu
I've been trying to stop drinking coffee for a while. I would have two strong
coffees a day and a first thing in the morning.

First, I was surprised to find it doesn't make me productive at all. I've been
tracking my distractibility levels as a measure of my focus (I have a manual
counter by my desk) and record my daily times in spreadsheet with notes for
those time blocks when I drank caffeine. My distractibility goes up by 100% on
average ...

Yes, you get an energy and alertness boost but in my case it's funnelled into
lack of focus. It's tricky because it works but you lose.

Secondly, having black coffee every morning on empty stomach led to some
stomach issues that are now gone. I also had regular migraines (turns out
migraines are dopamine related - i.e. caffeine)

I went cold turkey - headache for days. Then I put up a spreadsheet on the
cupboard in my kitchen and made a commitment with my gf to only drink 3
coffees a week, each logged.

Now I keep it at 3 a week and I drink them strategically.

Instead of going for the coffee first thing in the morning I leave it for the
moment, mid day on days when I actually need the boost, instead of ruining my
natural energy right in the morning. This makes me super productive.

I have no migraines, good solid energy and better focus throughout the day and
when I actually drink a cup I really feel the caffeine in my brain (it feels
just like a drug) and benefit from it.

------
bmn__
In [https://daringfireball.net/linked/2017/11/13/coffee-
cardiova...](https://daringfireball.net/linked/2017/11/13/coffee-
cardiovascular-disease), Gruber writes:

> I like that 5 cups of coffee per day qualified as “moderate”. That’s right
> around what I consume.

My immediate thought was "that's crazy, if anyone I know were to drink that
much, he'd get mighty uncomfortable or even ill with shaky hands, a punishing
heartbeat and heavy sweat". I told my colleagues. One replied and pointed out
that the Americans dilute.

All the measurements in the comments so far are useless for drawing a
conclusion. We should use milligrams of caffeine consumed and the body weight
to have a sound basis for comparison.

------
tarasmatsyk
No coffee for me, I prefer tea (without milk :D)

I used to drank coffee when I didn't have enough sleep or had to go to the
office before 10 AM. My body never reacted well to the coffee and it got worse
when there were morning meetings.

Since I gave up on the office completely I don't need more coffee and drink it
maybe twice per year just to enjoy its taste if I am in the right mood.
Sometimes I envy people who can have 2-4 cups in a day and be fine as coffee
nowadays is too good to ignore it. Anyway, as for me I get too much dizzy from
it and feel like a hungry squirrel from the "Over the Hedge" squad.

------
nextweek2
10-12 on a work day, have done for 20 years. When I'm off I end up having 3-4
during the course of the day but certainly feel more sluggish on those days.

I took a break for 4 months a few years back (to see if I could) and really
struggled to keep my eyes open, even with 8 hours sleep on a normal day.

I don't have any issue sleeping and no negative effects from large volumes of
coffee. I drink high strength coffee.

This is also probably offset because I drink a lot of water during my day as
well. Again probably 10+ pints of water during the course of the day. I'll
drink water no matter what I'm doing. I can't fathom how some people go hours
without water, to me it's the most important thing for my brain function.

------
keiferski
A piece of advice: Every day, once a day, give yourself a present. Don't plan
it. Don't wait for it. Just let it happen. It could be a new shirt at the
men's store, a catnap in your office chair, or two cups of good, hot black
coffee.

~~~
docdeek
The rare Twin Peaks reference on HN. :)

------
tekkk
Once upon a time, I drank about 3 a day. Then I would start to get headaches
after a month or two, and had to take a break from coffee.

Then I started drinking 2 cups a day. Now it took longer for the headaches to
appear, but eventually they did. Especially if I didn't drink for a day, the
next day headache would probably emerge.

Now I drink 1 cup a day. No headaches. And frankly, 1 is enough. It's the same
problem with every form of indulgence - it's not about the quantity, but the
quality.

------
pmontra
Zero. Probably an outlier. It doesn't do me anything.

~~~
glandium
Zero here too. I hate the taste. I hate the smell. And I'm French, so usually
people have a sort of look of disbelief when I say that.

~~~
tothrowaway
I hate the smell too. I commented to a friend that coffee smells like canned
tuna. She thought I was making it up, and Googled it. Turns out, I'm not the
only one:

[http://thefrenchexit.blogspot.com/2012/02/why-does-coffee-
sm...](http://thefrenchexit.blogspot.com/2012/02/why-does-coffee-smell-
fishy.html)

------
Areading314
I have found strong, loose-leaf tea to give me a much better energy profile
than coffee, and it seems to be healthier. There is also quite a variety in
different types.

~~~
spacechild1
I also prefer loose-leaf green tea. To me it feels more gentle, coffee tends
to make me nervous and my stomache complains. I still occasionally drink a cup
of coffee when I have to go somewhere very early (which for me is anything
before 10am) and I need the sudden caffeine rush to overcome my sleepyness.

------
csa
Not currently working as a programmer, but I have worked as one in the past.

I only drink decaf, and I will have a cup a few times a week that I make as a
pour over for myself. If I am feeling crazy, I will make two.

I am very sensitive to caffeine, and it impacts my sleep very negatively. I
tried decreasing caffeinated coffee to half a cup early in the day (e.g., 8 or
9 am), and it didn't matter. I sleep much better when I don't drink
caffeinated coffee (or any drink that has very much caffeine).

That said, my understanding is that decaf actually has a small amount of
caffeine, but it does not seem to impact my sleep at all. I wonder if the
amount of caffeine is actually that low in decaf.

------
mysticmode
I drink around 7 to 8 times a day. People say it's bad, but who cares.. I'm
just enjoying my coffee and a good smoke everyday.

------
Yetanfou
Real Programmers Drink Tea, have you not heard?

Anyway, 1 a day, max. Tea on the other hand is not counted in cups but in
litres, the cup I use holds about half a litre. I go through 3-4 of those on a
good day, 1-2 in the evening. During the day it mostly contains a darker
fermented tea variety - I buy it by the kilo - usually labelled 'Ceylon',
often with some form of horse on the packaging and a horse-related name even
though they're different brands. In the evening I often have some green tea,
either plain green or jasmine or with star anise. For all-night hacking
sessions I like to use a mix of jasmine and Lapsang Souchong (smoked tea).

------
milansm
I quit coffee as part of New Year's resolution. I started feeling nauseous in
the morning if I drank a cup of coffee in the afternoon the day before.

Once I quit, I thought I'll be less productive, and that I won't be able to
focus, but after a week or two, my body recovered from the caffeine addiction.

I started drinking black tea - two cups per day. It's still caffeine, but in
far less amount.

I miss coffee, though. I miss its smell and taste and somehow I correlate
coffee with work satisfaction, creativity, and being productive. It's probably
because the coffee is marketed around work culture, and I bought that.

~~~
dmarchand90
Also quit coffee to switch exclusively to green tea. I was just getting too
much anxiety. I definitely feel much calmer without coffee. In general for I
think I was a great move, I work a little less, but when I work it tends to be
on more relevant things.

I'll typically have one cup of coffee one day on the weekend, especially if
I'm going to do something to burn the energy (hiking/biking).

EDIT: technically not a programmer but a grad student in a computational
field, but I think it's very similar work mentally

------
scott10
Pre lockdown:double-shot when I wake up wile the Keurig was heating up, then a
cup of coffee. 5-shot latte on the way to work, sometimes a 4-shot afternoon
latte. I gave up coffee once in the 90’s for a month. I felt rundown and was
very congested; I thought I had the flu. One day walking through the breakroom
I was walking past the coffee pot and had to have a cup.i felt a bit better
and went back for another. I felt better still. After 5 cups, I felt fine and
my congestion was gone! I never cared after that how much coffee I drank as
long as I got enough.

------
danaris
None.

I've never liked the smell/taste, and on the occasions when I get some
caffeine from a different source, I find that, at most, the effect I get from
it is a bit of jitteriness and a headache later on.

------
trm42
I've had about two cups of coffee in my whole life but I'm addicted to tea.
Especially good quality senchas.

At work place I was drinking about 2-4 x 450 ml per work day. Now at isolation
home it's 2-3 cups (maybe 200-250ml per cup) every work day.

Not sure, if the reason for lesser tea consumption at home is because my 450ml
pot is at the work place or because I have better concentration at home and
less distractions compared to the noisy open office...

------
downshun
Minimal.

Even with the increased alertness, it steals away that productivity from the
next day, often resulting in a net loss due to lack of proper sleep.

It increases alertness, but reduces focus.

Reminds me of a friend's remark on why he quit pot: "the scary part was it
really convinced me I was productive in my day when in fact I was not"

------
roydivision
None. I have two at most cups of caffeinated tea in the morning on a work day,
and that’s it for the day. I have a very low tolerance for caffeine, a little
goes a long way. And I’ve fallen into the trap in the past of starting to rely
on it, which turned out badly, stress, sleep deprivation, etc.

------
jrs95
Now that I'm working remote & holed up in my apartment all the time, none. I
got some of the DOOM Eternal branded G Fuel for the game launch, and it's
strong (300 mg of caffeine per serving...and it's spicy lemonade, which sounds
weird but it's delicious) so I have that on occasion in the morning to recover
from a night of bad sleep. For the most part been staying away from the
caffeine though and I've adjusted to it pretty well.

As soon as I get back in the office though, I'll probably be having 3-4 cups a
day. Sometimes cold brew, mostly just black coffee. Occasionally I just do
tea. Part of it I think is I just have a bit of an oral fixation, so drinking
something helps me vape less (I used to smoke) and eat less (mostly sedentary
lifestyle unfortunately)

------
CM30
None. For whatever reason, I just don't care for the taste of either coffee or
tea.

That isn't a health thing either, I simply csn't understand the appeal of
these types of drinks and have never liked the taste of any I've tried.

------
sethammons
Zero. While coffee smells nice, it all tastes like ash. No, it is not burned;
I’ve had pros coax me into a sip of the best they know. Ash. Also, I get tired
when I take caffeine. The best pick-me-up for me is a light, high protein
snack.

------
haliou
Used to drink 2 cups a day. 1 after waking up and the next as soon as I
reached the office. As coffee affects my sleep quite badly, moved to having
only teas during the weekdays and enjoying the coffees at the weekend.

------
robjan
I used to drink very little but then the office reduced the friction of
getting a cup of coffee by installing a machine which grinds and brews
espresso. Now I am on 3-5 cups per day but slowly reducing my intake.

------
SBCRec
I have done many regimens.

My current pre-quarantine schedule was:

Morning 1x long black at a cafe near the office with a colleague

Rest of work day (plus minus 1 on each item) 2x long black from machine in the
office, 1-2x long black with another colleague(s) at a cafe

Home (around 5-6pm) 1x long black

Current WFH schedule is: 2-5x long black roughly every 90 mins.

I enjoy the ritual of making it (plunger) and the warmth. I don't think I get
a buzz anymore, but the odd time I do, I love it.

I don't get any noticable side effects, and have gone periods 1-4months
without drinking it with no adverse effects.

------
angarg12
Once upon a time I used to have 6 to 10 (3-5 double Espressos). Nowadays I
tend to have 4, 1 double Espresso for breakfast and two Americanos, one mid
morning and another one after lunch.

Despite what others say I never had headaches or other adverse effects, I just
get 'the jitters' if I have more than 5-6. Two weeks ago I quit coffee with my
wife as part of an elimination diet and again I haven't felt any side effects,
although I do miss the flavour and feel more tired at times.

------
adev_
Between 0 and 8 cup per day, depend of the day.

\- When I'm traveling or on holidays 0. I travel regularly in countries
without coffee culture and jet lag with coffee is a terrific mix.

\- In normal day of work around 5 including 2 in the morning.

\- In heavy day of work with many meetings around 8. I tend to prefer good
technical/design discussions around a coffee instead of endless (useless)
PowerPoint session. It's in my experience both more efficient, human and
brief.

------
jcuenin
I don't drink coffee, just water or tea sometimes :)

------
sourdesi
Probably 2-3 per day for me.

Side note: One of my favorite authors Michael Pollan recently published a
short audiobook on the effects of caffeine, some of the history behind it, and
his experience going cold turkey for a few months. Really quick and
interesting 2 hour listen. It's called Caffeine.

Thought I'd share since I found out about his last book "How to Change your
Mind" on HN and found it fascinating.

------
pxhb
A lot - around 6-8 cups/day

I have one large mug of coffee first thing in the morning (~3-4 cups). I then
have a mug of half-caff coffee in the late morning, another mug of half-caff
in the early afternoon and occasionally an additional mug in the late
afternoon.

I have gradually been cutting back on caffeine, mostly by slowly transitioning
to more half-caffeine coffee.

------
cafard
I drink my real coffee at breakfast: two strong cups of a dark roast. At the
office, I will get a couple of cups of cafeteria coffee in the morning--I
don't regard it as serious coffee, just as something to sip in the course of
the day.

Over the last six weeks I haven't been to the office, so the two strong cups
at breakfast have been all I have.

------
perlgeek
None at all.

If you're not used to coffee, you need it less.

------
captn3m0
Zero. 1-2 cups of tea (usually black, but sometimes Chai because my flatmates
prefer that).

Guessing my average per day would be 1.5 cups or so.

------
BrandoElFollito
I like the taste of coffee but is no impact on my body: I am not more alert, I
can go to sleep right after a coffee and I have no problems with sleep.

I usually drink 4 or 5 Nespresso cups. Sometimes 6 or 7.

I can go without anytime, but I would then sometimes miss the taste and the
whole "sitting in the hamac/couch with a coffee"

------
mstaoru
I prefer extremely dark, almost charcoal roasts (which actually have less
caffeine) of Colombian or Indonesian origins. Roast them myself in a pan over
a gas stove. I can drink 3-4 mugs of Aeropress coffee, 17g beans per cup.
This, and smoking a pipe of a good English or Oriental tobacco, absolutely
heaven.

------
fanf2
I make a 1 litre cafetière of coffee most days, which makes three mugs of
coffee. I use about 50g - 60g coffee per cafetière. I have a Bodum Columbia
which is insulated to help keep the coffee hot for a couple of hours. And I
try not to have more caffeine after my morning coffee.

------
snypox
I don’t drink coffee at all. I don’t get the hype. It makes some people
addicted which is scary.

~~~
mesaframe
Coffee doesn't work for me too. Sometimes I feel sleepy after drinking coffee.

------
quixquaxqux
Since quarantine and WFH I'm pretty sure I've been overdosing. Earlier this
week I was feeling anxious, jittery, and dehydrated. Detoxed from caffeine
Wed-Fri and today (Sat) feeling much better. Will ease back into 1 cup a day
and drink more water.

------
MrDresden
In my experience being in the office causes me to drink more coffee due to the
social aspect of it. I got my self espresso machine last xmas and am now only
having 2-3 espressos a day where before I was perhaps having 3-5 big mugs of
strong coffee.

------
bootloop
I don't drink coffee. I prefer to sleep when I need rest. But I trink a lot of
water. And as I like it cold I am fetching new once throughout the day. That
gets me away from the screen and allows me to talk to peers (who drink
coffee).

------
pizza234
I drink 4/6 espressos every day.

There is no correlation, beyond any doubt, with the quality of my sleep (I've
tracked my coffee drinking and sleep patterns for a long time), as long as I
don't drink any after a certain time in the afternoon!

------
markpapadakis
I never had coffee. I drink Diet Coke and I enjoy tea ( I have some once every
week or so ). I have been writing code for over 25 years now, and I never felt
that I was missing out but then again not sure I’d know either way.

------
tmaly
I make a cup using full immersion method in the morning. If I am still tired
after lunch, I might make a second cup.

That is it, I don't go over 2 cups. I try to make the second cup before 2pm my
time.

------
simonblack
Used to drink 6-10 cups a day, even one at bedtime.

These days, it's one or two in the morning for breakfast. I find I work better
if I am more relaxed than if I'm wide awake. All-niters are a thing that is
gone decades ago.

------
photawe
I thought I drink too much, but reading the other answers, seems I'm on the
safe side :D

I drink 3-4 cups/day (each cup, with one teaspoon of Amigo coffee and quite a
bit of milk :P)

------
DDR0
I don't drink coffee. Or tea. Or energy drinks. I get me enough sleep, such
that I'm waking up naturally before work, and then I just… do it. ¯\\_(ツ)_/¯

------
bdibs
I work from home, use an Aeropress, and drink between 4-6 cups of black coffee
per day. Once it starts getting late I’ll sometimes throw in a cup of green
tea.

------
ulisesrmzroche
Probably like a gallon altogether from all sources, sometimes more. Cheers me
up knowing that soon I’ll be so intense

I actually think the jittery feeling is the best part

------
kevinherron
I drink 1 cup every morning, and sometimes part of a 2nd cup after that.

When I was still working in an office I’d often have a double espresso after
lunch as well.

------
non-entity
Not a lot. I'm not a huge coffee fan, I'll drink it if it's free and theres
nothing else and occasionally I'll buy one, however.

------
teabee89
I don't drink any. I take power naps if needed.

------
kleer001
Zero.

My body doesn't like coffee. Trust me, I tried, for a good decade. It used to
be good between me and coffee, but not so much anymore.

------
ClikeX
3-5 a day. Usually 2 in the morning, one right before lunch.

Sometimes I'll do one in the afternoon and/or a decaf after dinner.

------
polyterative
2 espresso, one once awake, one after lunch

------
chad_ocho
I take some vyvanse in the morning along with a tall boy of Starbucks espresso
mocha and I’m good for the day

------
alienspaces
Two first thing in the very early morning, one after the other. Maybe one in
the afternoon... Or a nap

------
senectus1
not a programmer, more of an admin :-P

but, 4-8 cups of black no sugar coffee a day... 2 in the morn, one after lunch
one at about 3pm. that is a typical minimum.

Any more is typically because I didnt get enough sleep (gaming watching movies
working etc). I try hard to not do that now, but it sneaks in.

------
darkr
Between 2 and 8 cups per day. Usually switch to tea or water later in the
afternoon.

------
eldelshell
2 capuccinos/lattes: breakfast & after lunch. I get more milk than coffee.

------
ferros
Don’t forget for smokers that your body metabolises caffeine around twice as
fast

------
toxicFork
I quit a few weeks ago, after switching to decaf a few months ago.

I am happy to be able to sleep.

------
RickJWagner
How much coffee do I drink as a programmer?

All of it. Programming is the only job I have.

------
smcl
One after breakfast, one after lunch. Any more and my nerves feel jangly

------
AndyMcConachie
Regularly 2 cups a day. One after breakfast and another after lunch.

------
coder4life
About 3/4 of a large pot, so about 3 large coffees

------
sawmurai
About half a liter... more when I work. I love it :)

------
camjohnson26
Easily 2 pots for me, probably average 6-7 cups.

------
PopeDotNinja
~10 cans of diet soda per day.

~~~
dawnerd
I'm with ya, it's horrible but gets the job done. Can't stand coffee and tea
just takes too long (I do enjoy it though)

~~~
gremlinsinc
Same, used to be reg. soda though. Now it's diet Barq's, diet cherry pepsi, or
diet mtn dew. Lost a bunch of weight switching to diet a few years back.

------
mister_hn
3 cups espresso a day

------
Antoninus
3 cups a day.

1 after waking.

1 before standup at 10am.

1 at 3pm.

More ruins my sleep.

