« first day (2536 days earlier)      last day (2637 days later) » 

22:00
did yall go to sleep
it's okay guys i like talking with myself
I'm here just trying to look like im working
and I'm scared of remote debugging
I am just speechless
That's cause you're a dog
you filthy heathen
I didn't intend for you to find out like this
but I've never used realm
22:02
where do you go on sunday ahmad? If not realm.io to read from the New Document
i'm sorry bro
my mom warned me this world is gonna ruin me
Relational databases are overrated
having functional code is overrated
22:04
relational databases arguably make your code less functional
actually, 76% of programmers agree with that
a study show that 24% of programmers are satisfied with the design of their systems
a study shows that 24% of programmers are scared of new technology
a study shows that 24% of programmers work with very performant applications
Lol seems like Ahmad is pulling numbers out of his ass
22:10
🙄
Can I see some proof of that 24%
a study shows that 24% of programmers work on projects that have trouble scaling their database in a cost efficient manner.
can you give me a snopes.com checked source on the 76%
It doesn't work like that man. I called you out first. If you cannot deliver proof you lose the internet argument
a study shows that 76% of programmers write javascript
22:12
29
A: NoSql vs Relational database

Ravindra babuNoSQL is better than RDBMS because of the following reasons/properities of NoSQL It supports semi-structured data and volatile data It does not have schema Read/Write throughput is very high Horizontal scalability can be achieved easily Will support Bigdata in volumes of Terra Bytes & Peta Byt...

That guy gave a crap answer though
NO CITATION NEEDED
QED
i win m8
lol
22:15
no seriously though
look, you want to use NoSQL unless you have an IT department that can scale your DB hardware for you
but it's really hard to scale them
I think nosql databases can be great for some stuff
NoSQL is the easiest DB to scale
is it tho? it's hard to keep that mess under control
And you don't need migrations, volatile, maleable data, in the form of JSON dictionaries
22:16
especially if you deal with really complex data types
Nah it's easy, same idea as redux states in React
Really complex data types are bad design
fair
but then again I've never heard of a major tech company use mongo or anything else on a very large scale
Everything Google does with search data is NoSQL
22:18
Netflix uses Mongo for their core functionality
they pioneered it
wait really?
el goog search is built on nosql?
Using NoSQL to scale is literally how they out performed everyone
and became the giant they are now
22:19
ok check m8
I'll give it a try
How did you not know that xD
lol
I'm stupid that's how
wow
okay you got me there
Seems like we got you there
Definitely got you there
22:20
internet argument won
but only because you ganged up on me
That's arguing 101 m8
2v1 always wins
for real tho, I had no clue.
When you don't have a schema to enforce and making the entire data set stay in sync isn't a requirement, all you need to do is add replica sets to increase performance to handle large volumes
I expect a git patch tomorrow that reworks all if yelp to use realm
lol
22:22
I'm on it my dude
I did a select count(*) users the other day
pretty cool that they give me (read) access to the prod db
now you need to delete all the 5 star reviews of our competitors
what about read access do you not understand mate
read your way into a promotion
senior intern is not a position
idk, i feel like if Senior is in the title, you should have write access
22:25
Not with that attitude
don't mess with me
i can flag your yelp account
you won't be laughing then will you mates
How are you going to do that without write access m8
i have admin access mate
beware
or you'll lose access to your food pics
22:35
Please no
I was just joking
his food pics are backed up in Realm
damn
did i just get bamboozled
no leverage now
now you're just a dotard
I've turned into carl
o no
worst nightmare
22:42
no, I'm still in control of my faculties
does this conversion at least come with volleyball skillz
soon
I'm doing physical therapy for my wrist, aiming to return to play this Sunday
oh damn forgot you had that thing :(
good luck!!
anyone particularly fond of algorithms here?
I enjoy a good algorithm
22:55
how 'bout creating one?
or maybe just recognizing it
sure, what's the problem to solve?
let's say I have n=6*10^4 people, and I need to sort them into groups (there are ~ 2*10^3 total groups, but assume it's enough room for everyone). Each person has a score according to which it is sorted (higher score - better) and has up to 20 preferences, and my task is to try to assign them according to preferences and scores
closest I could find is Single Marriage Problem, but it's not quite it
it's not a competition problem, so I don't need speed in order of seconds, but it should finish in reasonable time (I/O is the bottleneck anyway... well I hope so)
are preferences a hard stop or an optimal sort, how much so compared to score?
scores are hard stop
oh right, groups are of limited space (but there are smaller and larger groups)
and preferences should be honored on best effort basis, if possible honor first (i.e. if scores allow that), if not try second, etc.
so score is the dominate and within the score sorting, allocate preferences
23:03
that
that's right *
I would do a double pass then, the first part is easy, sort the users by score and assign them a pool of groups they can choose from
I have tried putting them in map which is basically Group -> TreeSet<Person> (sorted by score), but I don't have a good way of eliminating duplicates once I figure out to which group should one belong
that breaks it down into a much simpler best effort preference allocation
you can use stable marriage if you treat every slot in the group as a partner
so step 1. Allocate group slots to users based on score, s.t. each user in the pool could go into any slot in the pool
then run a stable marriage algorithm on the slots based on preferences
you'd need to turn the 20 some preferences into a more coherent numerical preference based on the criteria of those preferences
if a slot matches 20 preferences, then that would be the top priority in the SM problem
(how come I always do these kinds of things at 1am, just a moment to comprehend everything)
1. Allocate group slots to users based on score, s.t. each user in the pool could go into any slot in the pool
2. Do a pass over slots and users to assign a preference score to each user for a slot, based on how many prefs match that slot
3. Do the same for the slots, preferring users who match their allowed prefs
4. Run the Stable Marriage assignment
23:13
aha, I think I see where you are going with that
it seemed almost trivial this morning
You could probably do better knowing more about preferences and how they work for users and how slots are assigned
or if there is some hierarchy within a score group to provide preferential treatment
well basically preferences are a wishlist, user expresses it wishes and the system should figure out if he's eligible according to his score, and each group has a quota (drawing the line when same-score users is not of much importance at this moment)
yeah, my explanations are probably far from the best, I'm trying to generalize it on the go
so preferences get cut if your score isn't high enough? if so is there a slot for every preference that isn't cut in your score group?
not sure if I quite understood it
one should be assigned to the group which accepts n people only if in that group there aren't already n people with higher score
ok, and the group people WANT is based on preferences
23:20
and if the group is already 'full' the person isn't eligible for it and the system should attempt to put them in the next one from the preferences
right
and people can have the same score?
yes
so start from the highest score, then for each score, assign preferences for a group for each user
and each group can prefer or be neutral, depends on your use case
groups are pretty heartless, they don't care, and so are people (i.e. people don't know about nor prefer other people)
Let me think if there's a better way hold on
23:25
alright I've overlooked that one even though it's simple and it seems like it should give correct results
Yeah im convinced that since scores have highest priority, you solve that problem by assigning them in order, highest to lowest
though I was having a different 'future possible requirements' so I wasn't really thinking in that direction, i.e. assume every person can have different score for different groups
the problem then is, how do you assign the subset
the group doesn't HAVE to be full of people with the same score, but it can, especially with smaller groups
realistically it won't happen
If you could determine a pecking order, like less frequent users get their preferences first, or vice versa it could simplify it
you could randomly generate an order and just pick the best match available at the time for the user
or you have to optimize the number of preferences matched for subset of users with the same score
23:31
honestly I haven't given same-score users much thought, it's real world data so amount of them where it'd be a tie breaker is statistically insignificant (most probably)
but what I understood is basically sort users by score and attempt to assign them according to their preferences, in order?
Then just give the highest score the best match available and randomly generate or not care about the order of same score users
yes, it guarantees that there won't be any user with a lower score in the group they want at the time
and in that case, the bonus question is what if user can have different scores for different groups?
then you add the user at that score but skip them for groups where it is different
and add them only for the lower groups at the lower score
how do I sort them?
so if a user has 10 scores, then they are in the list 10 times
but have a list of eligible groups
if no eligible group is available, they are skipped -edit- and reconsidered later
you'll need to insure/assume that there will be a slot available though
23:35
that's doable
honestly it seemed like a more complicated problem
thank you
if I had a rubber duck I think it'd only make things more complicated
lmao
sometimes the best solutions and hardest to see are the simple ones
and it takes someone not zoomed in on the problem to point it out
exactly
I usually sleep it over
but I knew I was close with this one and it didn't let me sleep
while in truth the point where I was closest was public void simulate() { }
lol
23:40
Unrelated to this, I also thought about switching to Kotlin for everything, it seemed like a much more fun language (pun intended)
but I don't know how people handle postfix declarations of everything
I don't know much about Kotlin but I work on so many different projects and so many different languages that I can't afford to keep learning flavors of the month
I learn new stuff when there's a compelling need to, which is already quite frequent.
I don't usually have the need to learn everything, so I usually can pick whichever I prefer (the perks of being young!)
I'm also thinking about Scala, but everything I have read so far hesitates to explain what the fucking underscore is
or for comprehensions which are presented like magic (if I wanted magic I'd have worked with R)
and in school we're learning Prolog, I guess the only use for it will be bragging rights
lol
I did a bit of prolog and scheme
never used it professionally
If work slows down I might take the time to learn Swift and Kotlin
One of the rare print books translated to my native language sitting on my shelf is on Swift and iOS programming
but I don't have anything by Apple in my home so I got little use for it
Yeah, I'm not an Apple fan but I can't just not develop iOS apps
23:48
unless Swift becomes new JavaScript and publishes one framework for desktop apps, and one servers, and everything else with a CPU
eh, from where I come from Apple is luxury
but it is a useful skill anyway (when you get your hands on a MacBook/iPhone)
We do client work and mobile development projects are always Android and iOS
well that's obvious, you can't just ignore 15% of the market
anyway, I'm off to sleep
gn o/
good night

« first day (2536 days earlier)      last day (2637 days later) »