
What programming languages are used late at night? - frostmatthew
https://stackoverflow.blog/2017/04/19/programming-languages-used-late-night/
======
ericfrederich

      C programmers start the day a bit later, keep using the language in the evening, and stay up the longest. This suggests C may be particularly popular among hobbyist programmers who code during their free time (or perhaps among summer school students doing homework).
    

... or they're the only ones stuck down a rabbit hole chasing some obscure
memory leak that keeps bugging them until late in the evening.

~~~
kccqzy
Use address sanitizer and leak sanitizer (-fsanitize=address). Compile with
options that forbid omission of frame pointers (-fno-omit-frame-pointer) to
get a nice backtrace of where the allocation occurred. Also compile with full
debugging info (-g) so that leak errors contain file and line numbers. Problem
solved.

EDIT: this apparently only works on x86-64 Linux. If you are targeting
something else, it might be slightly harder.

~~~
derefr
Unless you're working in the embedded space, there's no reason to not write
your C project to target whatever arch is the most debug-friendly first, and
then just port it to the system it's "for" at the end.

~~~
jseaidou
Unless the issue ends up being arch specific

------
empath75
"Learning haskell" is pretty much in the same category as "Write that novel
I've been thinking about."

~~~
sotojuan
Learning Haskell has been made much easier with Haskell Book[1]. Unlike LYAH,
it actually has a ton of exercises and in-depth explanations so you understand
the _why_ behind things as you make progress. That said, it requires
discipline to read through.

[1] [http://haskellbook.com/](http://haskellbook.com/)

~~~
NickM
The big problem I've had with Haskell is that even after gaining a pretty good
understanding of the language (including monads and such) I still can't fathom
how to do anything real with it.

Exercises are great and all, but once I try to go past exercises, I start
getting lost in layers of monad transformers, and I struggle to figure out the
"right" way to do anything. It just feels like there are all these layers of
abstraction and complexity that are required for even simple applications, and
I can't seem to reach the point where it all clicks for me and becomes
manageable.

Reading the TOC and chapter notes for that book, I'm not convinced it'll help
me. Even the "final project" at the end of the book is described as "a little
weird, but small". I don't need more weird, small examples, I need a full-
fledged application! I've tried picking out random Haskell OSS apps and
studying them, but without newbie-friendly documentation to walk me through
the code, I find it very hard to follow what's happening....

~~~
cstrahan
I'd recommend just making yourself pick up a project, and run with it. Try not
to over think it, and if you start to feel paralyzed, just say "fuck it, I'll
do it the first, shittiest way that comes to mind."

As an example, the first "real" project I wrote in Haskell was one or two
weeks into learning it: a web testing framework/DSL (a la Capybara[0]) that
spoke a (custom) protocol over socket to a headless webkit instance[1].

Looking back, I abused stuff like type-classes and such, but then again, it
was all a learning experience. I should probably be a little embarrassed about
how I left the project, but in the interest of providing some inspiration,
here it is in all its gory -- I mean, glory:
[https://github.com/cstrahan/happybara](https://github.com/cstrahan/happybara)

[0]:
[http://teamcapybara.github.io/capybara/](http://teamcapybara.github.io/capybara/)

[1]: [https://github.com/thoughtbot/capybara-
webkit/tree/master/sr...](https://github.com/thoughtbot/capybara-
webkit/tree/master/src)

~~~
jcadam
> I'd recommend just making yourself pick up a project, and run with it. Try
> not to over think it, and if you start to feel paralyzed, just say "fuck it,
> I'll do it the first, shittiest way that comes to mind."

I tried that. When I got stuck (fairly early on), I ended up switching my
project from Haskell to Clojure :/

------
pierrec
>My final (and favorite) observation is that developers in Paris take the
longest and most consistent lunch breaks. Well, if I lived in Paris, I would
too.

A contributing factor might be that a lot of French companies include meal
vouchers in their benefits. Generally employees are given the choice to deduce
some amount from their payroll and get nearly double that amount in meal
vouchers, because the vouchers are government-supported including a tax
concession. You can use these at most restaurants in Paris.

You can, of course, use the vouchers to grab a sandwich anywhere and eat it in
front of your code, but overall it encourages actual restaurant breaks, since
you basically have more money specifically to spend on your lunch.

~~~
rdiddly
The fact that you work in one of the most beautiful & well-designed cities for
walking around or eating outside doesn't hurt either!

~~~
jgtrosh
Also more money for food usually means more wine usually means more time
before return to work

~~~
olivier1664
The voucher do not cover alcoholic beverages [1]. That and the difficulty to
code after drinking do that peoples generally do not drink during lunch. But
yes, Frenchs take their time for lunch :)

[1] [http://www.edenred.co.in/Our-Offerings/Work-life-
Benefits/Ti...](http://www.edenred.co.in/Our-Offerings/Work-life-
Benefits/Ticket-Restaurant-Meal-card/FAQs.aspx)

------
falcolas
Otherwise written as "what programming languages are being asked about late at
night."

To me, who rarely pulls up SO, correlating SO questions and page views with
usage is a bit biased.

~~~
startupdiscuss
Whoah! The big news for me is that there is a programmer who rarely uses SO.

I use it constantly. Can you say more about:

1\. What your programming set up is.

2\. What you do when there is an issue?

I didn't know there was a reasonable alternative. I do the Google -> SO a lot.
The only time Google brings up a different page is if the question is REALLY
basic like how to use a function.

Edit: added this postscript:

I have found a lot less need to look up things like "are there optional
parameters in .len()?" because the IDE helps with that.

I need to look up strange errors that I don't understand. (Like when you
install a new library and your code breaks). Those are almost never in the
official documentation because they didn't plan for it.

~~~
Morgawr
I also don't use SO that much, I never have. Maybe I google a few things once
in a while and sometimes I stumble upon a StackOverflow page, but never to
actually solve errors. It's usually to get a bit more insight out of
curiosity.

Professionally, I work at Google and internally we have an extensive corpus of
knowledge for various problems and programming patterns that really are tied
to in-house technologies that don't really exist outside of the company.
That's mostly the #1 reason why I almost never stumble upon SO.

> 1\. What your programming set up is.

I code in Python, Bash, Haskell and sometimes Go. Plus a couple of internal
languages that aren't really interesting (mostly config languages). I write
code with vim and manage my project with tmux sessions.

> 2\. What you do when there is an issue?

I look at the logs, look at the code, I look internally for any resources we
might have, I spend some time trying to figure out what is going on and
usually that takes care of 90% of the problems. If that is not the case, then
depending on the type of problem (is it an internal library? is it something
externally available?) I either ask on the internal IRC for specific teams in
charge of that platform, or I go to the external internet in search for help.
Most of the time, if that is the case, the situation is so specific that I
can't really find an relevant answer on SO so I more often than not just end
up in a #freenode channel for that library/language and directly ask questions
to the interested people.

~~~
s_kilk
> I look at the logs, look at the code...

This bears repeating.

READ \ _clap\_ THE \ _clap\_ FUCK- \ _clap\_ -ING \ _clap\_ LOGS.

READ \ _clap\_ THE \ _clap\_ FUCK- \ _clap\_ -ING \ _clap\_ CODE.

I'm amazed at the devs who just scroll up in the logs to the first error they
see, then copy-paste that into google or SO.

~~~
winteriscoming
I don't know if it's the team I work with or a problem in general, but a lot
of my time these days I spend on getting annoyed with developers who just keep
reporting "it's not working". Hardly any effort in looking at logs/stacktraces
and then mapping it back to the code - all of which they have access to. When
asked for more details about the issue, I almost always get answers like
"here's the place where we have the log files, can you look into it and tell
me what's wrong".

------
jswny
This is cool but every time I see something like this I think that this kind
of data could be seriously skewed by individual language communities. For
example, in the Elixir community we have our own forum, IRC, and Slack
channel. Because of this, I almost never visit SO for my Elixir needs.
However, I do when I am working with JavaScript, C, Java, etc. I know other
languages like C++ have similar communities which take care of much of the
questions which would otherwise be posted on SO. Does anyone else feel that
their language is misrepresented by data such as this?

(Not trying to knock SO here, this is a very cool analysis, but I do feel that
some of these problems are relevant.)

~~~
Nition
Same for Unity3D, which is one of the tags they have in their post but it
doesn't look very popular there. Unity3D has their own separate SO-like site
called Unity Answers, plus a large forum, plus a (somewhat out-of-date)
community wiki. So lots of people won't be hitting SO for help

Still, most of this particular blog post is about relatives between hours of
the day per language, rather than comparisons _between_ languages, so it won't
be too affected.

------
cies
What language people learn out of own motivation, vs what languages people do
for pay.

I'd say based on this graph it, and knowing Haskell myself, that choosing
Haskell is still a viable way to attract talent. (that Haskell-spike in the
animated chart half through the article is... opportunity I guess)

~~~
TorKlingberg
Just be aware that the animation makes it look like everyone is using Haskell
in the evening. That's false and caused by normalization. Other languages are
still more used.

~~~
var_explained
That's right: Haskell is _disproportionately_ used in the evenings, but it's
not highly used at any time. You can see in the 4th graph that of the 250
languages considered, Haskell is one of the lowest traffic.

~~~
dmix
This is assuming that SO is a popular destination for Haskell questions.

Github would be the better indicator. Especially if Github could include
anonymous stats for private repos too. That would give a good indication about
the commercial viability of the various languages.

I'm one of those people who uses Haskell a lot at night time and I rarely use
SO for it. I often find answers in documentation, blog posts, IRC, and books.
Whereas during my day job I tend to run into a lot of obscure framework errors
when I work with Ruby on Rails or the various weird quirks in Javascript where
SO is indispensable. I have different kinds of queries with Haskell rather
than copy/pasting error msgs, likewise when I use Erlang/Elixir.

Another example is Reddit:

    
    
        /r/python 122.1k users
        /r/javascript 82.4k users
        /r/java/ 51.4k users
        /r/php 40.8k users
        /r/cpp 35.7k users
        /r/ruby 31.1k users
        /r/csharp 28.2k users
        /r/haskell 22.8k users
        /r/golang 20.7k users
        /r/c_programming 19.6k users
        /r/swift 17.1k users
        /r/rust 16.1k users
        /r/sql 13.6k users
        /r/scala 10.4k users
        /r/lisp 10.3k users
        /r/clojure 10.0k users
    

Haskell is not far behind Ruby, C#, or CPP on Reddit. Yet the difference in
the SO chart is dramatic.

But no doubt it's not as popular professionally as other languages, sadly, but
it's not quite as fringe as this particular data source indicates.

------
failrate
I generally switch from C# to Drunk Python.

~~~
frogfuzion
I'm there too, except Drunk Swift. I tried Drunk React/Redux a few times but
almost died.

~~~
scandox
I do a fair bit of drunk C. Something beautiful about a pointer to pointer
after a couple of gin and tonics.

~~~
stinos
Being drunk also really helps in dampening the excruciating pain from shooting
yourself in the foot.

------
goache
I wrote a blog post awhile back comparing the differences between day and
night commit messages :-D. [http://randomlyunique.com/data/2016/late-night-
coding/](http://randomlyunique.com/data/2016/late-night-coding/) (it's a fun
looking wordcloud)

------
jakobegger
Interesting to see that C is used a lot in the evening. Maybe that's because C
is used in many Open Source projects, and many people contribute to OS in
their spare time?

------
thewhitetulip
I really do not understand how anyone could judge up which languages are being
used at X time during the day or night based on stackoverflow.

I rarely use stackoverflow (like once a few months), how do we factor in the
data which we don't have in it? What's the accuracy of the current data? And
how can we foem conclusion?

The post should say, "What tags are used to ask questions on stackoverflow at
night?" Because, as powerful as they are, SO can't quantitatively decide which
languages are used at what time, they don't have the data!! I learned an
entire language without ever looking at a SO qn, it was Go language.

~~~
frogfuzion
The point is that it's interesting to infer trends. This is not the supposed
to be the authoritative source for what people are doing during day and night.
It's just interesting and you can glean some patterns for sure. Stack overflow
is hugely popular and millions of developers use it.

Some people I guess are just so bright that they don't need it. That is not
most people.

~~~
thewhitetulip
Their title makes it sound autoritative!

------
israrkhan
I find myself using stackoverflow more while using certain languages, and
almost never when using others. IMO, a C/C++ developer or a backend developer
is less likely to use stack overflow as compared to a python/javascript/php or
frontend developer.

------
x97256
Is this done in EST/EDT? Does it account for developers in India, US, Europe,
etc simultaneously or does it convert the time stamps to say, UTC?

~~~
kej
The time charts are labeled "local time", so I'd assume they're using ip
geolocation or profile info to normalize everyone's times.

------
cxseven
Haskell wins as the most nocturnal, but I suspect it's because a good portion
of its users are students.

It's funny that the runner up is on the opposite side of the abstraction
spectrum: assembly. Students, longbeard contractors, and hax0rs must be the
nocturnal contingent there.

Meanwhile, COBOL programmers are stuck in bank basements with no internet
access.

------
MasterScrat
Anyone knows what they used to render the plots?

~~~
jrauser
Almost certainly ggplot2 in R.

~~~
madcaptenor
Also, the author says in the comments that he used ggplot2 for the static
plots and gganimate for the animations.

------
tormeh
What I'd really like is the correlation between different kinds of tools,
languages etc. and forced overtime...

------
omg_ketchup
Is it just me or does this not actually tell you which programming language
tags get the most traffic at night?

------
cr0sh
I find it interesting how during the daytime hours, most languages are in the
Microsoft camp...

~~~
executesorder66
Because most people are forced to use Microsoft technologies at work. But in
their own time they would rather use other technologies.

------
Safety1stClyde
Ironically, if this was a question on stackoverflow it would be deleted.

------
blanket_the_cat
What this data definitively effectively demonstrates is that only about 1/5 of
developers/engineers are taking a lunch. Way to go! Keep up the hard work
guys!

------
droningparrot
Excel in the streets, Haskell in the sheets

------
wslh
In this context I would love to see more programming languages available for
tablets, because tablets are good for learning.

------
trimbo
> C# programmers start and stop their day earlier

Maybe because they're often in finance?

Why wasn't Java compared?

~~~
Outpox
I can't answer why but if you want to see the Java stats, they shared this
tool : [https://dgrtwo.shinyapps.io/tag-traffic-
hour/](https://dgrtwo.shinyapps.io/tag-traffic-hour/)

~~~
trimbo
Oh nice. Well, C# still starts earlier than Java. Interesting. I thought
they'd line up more.

------
contingencies
Completely ignores VPNs? Everyone in China uses a VPN. Maybe China has more C
programmers.

------
anshou-
Yet another graph pointing toward the conclusion of "Tuesdays are the worst."

------
bluejekyll
It would be interesting to merge this data with GitHub commits.

------
lowlevel
They've given the answer to 'Which programming languages are used late at
night by people coming to StackOverflow for help.' Interesting I guess, but
flawed from the start.

------
metalliqaz
TL;DR: Only students use Haskell

