
Finding the real first post on Instagram - xwenf
https://birdeatsbug.com/real-first-post-on-instagram
======
doh
Instagram uses basic base62 with a very standard alphabet

    
    
      ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_
    

They started using hashing functions from Facebook after they got acquired
[0]. This function is used across the whole FB and the main benefit is that
it's time sensitive. That means they will sort based on time.

First few millions of IDs are just autoincrements and then they swapped to the
custom sort. If you are bored, you can dig through who used instagram in the
early days.

BTW base(62/63/64) is very popular way to encode IDs. Some sites will use much
more custom alphabet. My favorite was Vine which used

    
    
      BuzaW7ZmKAqbhMOei5J1nvr6gXHwdpDjITtFUPxQ20E9VY3Ll
    
    

[0] [https://instagram-engineering.com/sharding-ids-at-
instagram-...](https://instagram-engineering.com/sharding-ids-at-
instagram-1cf5a71e5a5c)

~~~
blotter_paper
What do you like about the Vine ID alphabet? I don't see the appeal, it cuts
out some characters yet still includes potentially confusing ones (I/l/1 and
O/0, which can look identical or nearly identical in some fonts). If not human
readability, why did they cut out standard characters thus making IDs longer
than necessary? I suspect there is a perfectly reasonable explanation, but I'm
missing it.

~~~
crazygringo
To me the randomized characters are a clever way of hiding "autoincrement" to
users, so it would be non-trivial to calculate the number being produced
daily.

Picking base 49 (a seemingly random number) seems to be perhaps a similar
security-through-obscurity thing?

I've written code to produce random (non-sequential) ID's for storage in a
database, but it's surprisingly non-trivial to produce a performant INSERT
that will work without ever producing collisions.

Relying on the database's AUTOINCREMENT but obfuscating the value through a
baseXX encoding seems actually much easier, when the only "security" you're
trying to provide is against reporters and business analysts trying to
estimate the site's usage/popularity, and they're quite unlikely to bother to
reverse-engineer your encoding scheme.

~~~
doh
Can vouch for the non-triviality of collisions. We have around 500k inserts a
second and wanted to have time sensitivity between them (so essentially basic
in on a timestamp) and fit it into 64bit unsigned integer.

We managed to get a safe space of around 50M per second, so we could safely
use shard_id to prevent collisions.

------
andrewmackrodt
Those timestamps are likely from the image metadata, there's no reason to
believe that the images are out of order from their numeric/shortcode ids.

What the author refers to as the "real post #1" has a taken_at_timestamp less
than the first picture. It's still id #6 in the database versus #2 (the dog
picture). Numeric ids are easily visible in the source of the page or by using
this not-so-secret query string:
[https://www.instagram.com/p/C/?__a=1](https://www.instagram.com/p/C/?__a=1)

------
quartz
Seems far more likely the timestamp is incorrect.

When writing a feed-based app, timestamps are one of the first things you
inevitably screw up (read it from local vs. the server, pull it from exif and
then decide to pull it from upload date, forget a timezone, fix a local time
on the server that was out of sync, update the timezone on edit vs on
creation, etc etc etc).

~~~
raldi
I'm not so sure about that; it's also fairly common for a database migration
in the early days of a product to shuffle row IDs.

This is the reason my reddit user number is lower than spez and kn0thing's.

~~~
quartz
True, but considering the Instagram team has claimed that the dog photo was
the first photo uploaded [1], I'm just not convinced the timestamp proves
otherwise on its own because of how easy it is to make timestamp errors in the
early days.

We may never know for sure...

[1]
[https://web.archive.org/web/20180202095552/http://blog.insta...](https://web.archive.org/web/20180202095552/http://blog.instagram.com/post/27359237977/2-years-
later-the-first-instagram-photo).

------
sauerbraten
I have my doubts about the timestamps on these first posts. How did Kevin get
from Pier 38, where Mike supposedly photographed him at exactly noon, to Todos
Santos at ~2:30pm, when it's 28 hours away?

~~~
yoz-y
If it uses the timestamp of the upload, rather than timestamp of the picture
then it is possible. However I don't remember if Instagram could use pictures
from the camera roll in first version.

~~~
fudged71
I don't think this was possible at the time. I thought instagram was
restricted to only posting right then and there, and camera roll access came
at a wayyy later date.

------
kripy
Facebook kept it a lot simpler: you can just iterate through integers. 1 - 3
have been deleted but if you navigate to
[https://www.facebook.com/4](https://www.facebook.com/4) it redirects to
[https://www.facebook.com/zuck](https://www.facebook.com/zuck) and so on. All
the original founders are sub 10.

------
OJFord
'reverse-engineered' is a bit grandiose isn't it?

~~~
derision
the definiton on wikipedia fits here. reverse engineering isn't always some
clandestine thing

> Reverse engineering, also called back engineering, is the process by which a
> man-made object is deconstructed to reveal its designs, architecture, or to
> extract knowledge from the object; similar to scientific research, the only
> difference being that scientific research is about a natural phenomenon

~~~
OJFord
Sure, it fits, but I just think it's over-selling it some.

As an aside, I just reverse-engineered HN and found the first ever submission:

[https://news.ycombinator.com/item?id=1](https://news.ycombinator.com/item?id=1)

~~~
capableweb
Yeah, you basically reverse-engineered something there. Good job!

For the average programmer, it might not seem too much. But for a normal user,
seeing something and figure out how it's working, without knowing internals
beforehand, can be said to be reverse-engineering.

I guess we should start rating reverse-engineering so people can know what to
expect.

~~~
ship_it
I think he just showed us what is insecure direct object reference and not
reverse engineered anything. Both op of your comment, and one from the post.

------
cjamesd
I'm working on a bug right now where we have some timestamps that are wrong.
Just saying.

~~~
neonate
Can you tell us more about the bug?

~~~
cjamesd
Turned out our backend team just had a graphql type def that was wrong. That
resulted in a nullified value, and the server logic following that treats a
null value for the timestamp to mean the task should be completed now. None of
this was reflected in the UI however.

So all in all, my bug wasn't that exciting, but if you think about the early
chaotic days of a startup, there are often nuances in dealing with date and
time that don't get thought through, particularly with newer developers being
pushed or pushing themselves to get things launched. For example, if you are
doing all of your testing locally, you might not find out until you get a user
or customer in another time zone that, hey, we should have thought about that.

Bottom line is, and I think this is really what I was thinking this morning --
I would never sink so much time into drawing conclusions with the early data
of a startup like this. Life is too short. If I am going to spend that much
time on something it's going to need to be a less risky investment.

------
RedactedProfile
> The users of the first app didn't really get what it was for.

Whenever I'm venturing on an idea, I have a pretty clear goal and a pretty
clear intent of use from a users perspective. However despite that, I'm always
asked by people (who, by the way, I often figure would be the target audience
for this new thing I'm building), "why?" or "what's the point?" or just
blatantly "no one's going to use this over [facebook/twitter/etc/etc/etc]"

I remember when first diving into twitter 11 years ago. I remember diving into
Facebook when it cracked open to the general public. I remember telling people
about these platforms, and the response always is "why?" or "I don't
understand what this is for or why I would use it"

I keep that in mind everytime I'm asked the same question about my own
projects. Not everything is going to be a massive hit, of course. But you
never know when one of these wild ideas becomes successful, and it will
usually be something that the people didn't know they wanted until you show it
to them.

------
qazpot
> you will be shocked how poorly they look and how far we have come in terms
> of the quality of Instagram content.

pics of photoshopped faces and body is quality content of instagram

~~~
polynomial
and not just instagram

------
suhail
More interesting: Why did Instagram instantly get a million users upon public
release in the AppStore? How did people discover it?

~~~
shaynesweeney
We didn't? The initial Android release did well. It wasn't released until
April 2012, iOS launched October 2010.

------
glaive123
> Post #2. Mike captures how Kevin's working on Instagram. The place is the
> same - Dogpatch labs, which later relocated from San Francisco to Dublin.

Dogpatch Labs was not later relocated to Dublin. Both Dublin and San Francisco
were open during the same time (as well as NYC). San Francisco and NYC were
closed.

------
maury91
> But what happens if after "/p/" you put A, B, C and so on? It appears that
> you can find the first 28 posts of the social network.

Maybe I misunderstood the phrase, but how can you get 28 posts from 26
letters? the article doesn't mention lowercase letters

~~~
epse
Maybe after Z it goes to 0 or 1?

~~~
maury91
The problem is that he says A to Z, not A to Z, 0, 1

------
jdivo
Looking at the first post Instagram has tremendously benefited/taken advantage
of improved mobile photo resolution during their run

------
hadiz
My takeaway is that IG was always built to be performance based social media
app. As in, the user puts up a performance for people to see.

Compare that to HN/Reddit/Blogs before and you can basically pinpoint when and
how social media changed the way we connect.

~~~
GaryNumanVevo
I mean, aren't all social interactions performative at some level?

~~~
hadiz
are you performing when you socialize with people?

------
shaynesweeney
Kudos ;)

