« first day (3200 days earlier)      last day (1742 days later) » 

3:24 AM
What's wrong with recruiters these days? What part of I don't want to have drinks with you is so difficult to understand that you text me 8 times rephrasing your question. As if I'm suddenly going to change my mind now that you waited 5 minutes to ask me again.
 
3:39 AM
yea, no
 
4:30 AM
\o
 
4:45 AM
morning
 
5:26 AM
@Sherif recruiters would talk to me once, then never again. I guess I'm a lost cause to them.
 
@Tiffany What's your secret?
 
 
1 hour later…
7:25 AM
@Sherif out of practice, no degree, not a lot of programming experience
TL;DR: be bad
 
Hello guys, I have a quick question about PHPUnit and the way we test an application. I am seeing the recommendations to use DI instead of directly doing `new XXX(` inside method to be able to test something.

This means I will be passing `XXX` from outside the class, maybe from some other class or my main script...But then that again poses same question for that script too?

Doesn't somewhere I will eventually have to use `new XXX` and still test it? Whats the solution to this problem?
 
7:41 AM
@Tiffany Yes I will see about IOC, I do know about DI. The thing I am confused about is- Do we mock new XXX everytime we test? Assuming XXX has already been tested itself? Or in this case, we should create our own mock.
 
@ashutosh dunno exactly, but this might help: jtreminio.com/blog/…
time for bed
 
8:00 AM
redaction an act or instance of preparing something for publication
 
8:11 AM
How add DoctrineORM to github.com/panique/mini ?
I have a question like this . stackoverflow.com/questions/42401367/…
How add DoctrineORM to Controllers..?
any help????
 
9:10 AM
morns
 
 
2 hours later…
10:55 AM
hi all
any expert here that can fetch data from json in php
 
11:07 AM
You need to be an expert to do that?
 
11:17 AM
Segmentation fault at /usr/src/debug/php-7.2.20/Zend/zend_string.h:289 – #78317
Segmentation fault at /usr/src/debug/php-7.2.20/Zend/zend_hash.c:489 – #78318
 
11:44 AM
I love it that it's so easy and deterministic in PHP to iterate over a map (by-ref) which is being modified
 
@bwoebi But why are you using references?
 
@Sherif so that I can extract all neighboring positions from an adjacency map into individual maps - iterating over the rows/cols and then recursively searching all neighboring places and removing it from the map when encountered (yes, I could also create a new map to mark whether I already walked a node, but meeeh :-P)
 
@bwoebi Wouldn't be easier to use an object here?
I'm assuming you're trying to do some kind of BFS graph traversal.
 
@Sherif why? I have a simple integer coordinate map, $map[$x][$y]
 
@bwoebi Well, because objects usually bifurcate the need to rely on references
Makes it easier to think about and code, in my experience, but YMMV.
 
11:56 AM
@Sherif If I have a map I think in arrays not in objects
and in particular it lets me decide whether I'm now operating by ref or by val
 
Well, technically speaking they're both implemented as maps so...
I just find one easier to dereference than the other.
 
@Sherif technically the one is a strings map, the other can also hold actual integers
 
True
 
and ... are you really keen about doing foreach ($obj as $x => $val) ?
 
But does that matter?
 
11:59 AM
not really, just perf, which in this case is not too important
 
@bwoebi I mean one thing with the traversal problem you're describing is that when I use an object to implement the map I can easily just add a "visited" property to the object
 
sure, in the end it does not really matter
it's more how you want to think about the algorithm
 
Just curious. What kind of problem are you working on? I like graph problems :)
 
drawing arrows between some tiles representing dependencies (a tile may depend on multiple other tiles and any tile may be requirement for multiple other ones)
generating svg
 
Oh I see.
Sounds like a DFS problem then.
Exploring relationships...
 
12:06 PM
actually doing a BFS search
but does not really matter as I need to visit everything anyway
 
Well, it kinda does. BFS is really good at finding shortest path between nodes (but is a memory hog since you need a queue to build out the levels). DFS, by itself, is pretty useless (but memory efficient), though when augmented it can be great at things like finding connected components, determining connectivity between nodes, find bridges/articulation points, etc...
I had been working on a distributed BFS implementation in PHP when I was working on my web link structure problem.
Though I've put that to the side for quite a while now :/
It's hard work scaling a distributed BFS with a graph of several billion nodes
 
@Sherif yeah, it's technically a memory hog, but proportional to the count of nodes
so if your count of nodes is limited it's fine
 
yup
 
12:31 PM
ah, man interview prep is so exhausting
 
1:01 PM
@Sherif what are you actually preparing for interviews? (I've never been, thus I wonder)
 
I have an interview at facebook next week and it's been a while since I've interviewed
They have a very rigorous interviewing process
So just brushing up on my datastructures/algorithms and design
 
ah okay
 
@bwoebi The author of the book: youtube.com/watch?v=4UWDyJq8jZg in case you're wondering
She's X-Google
 
https://ibb.co/D80Rq4z
there is unidentified file changes which I don't know how to solve. I also did git stash but still no luck.. any idea guys?
@Sherif All the best.. :)
 
2:11 PM
@Exception Thanks
 
@Exception make a backup of the directory, and thrn do git reset?
 
2:52 PM
I need a ux person with some free time
ping me if you are that person ...
 
 
1 hour later…
Wes
4:00 PM
just found out that bubba gump shrimp actually exist
 
4:14 PM
@Wes Does Tom Hanks make it?
 
Wes
not that i know :P
 
> The Bubba Gump Shrimp Company Restaurant and Market is an American seafood restaurant chain inspired by the 1994 film Forrest Gump. ... The first Bubba Gump restaurant opened in 1996 in Monterey, California by Rusty Pelican Restaurants in partnership with Viacom.
Interesting
BTW, jbl.com/bluetooth-speakers/… Totally worth every penny
Superior sound quality compared to beats
 
 
2 hours later…
6:12 PM
Afternoon
 
Wes
7:06 PM
\o
 
 
2 hours later…
9:26 PM
@Sherif amazon.com/gp/product/B01DZ56MX0 I have this, I like it. Great for shower music.
Battery's died maybe twice or three times, and I've had it over a year. Granted, I don't use it frequently, but still.
it's too bad they don't have it anymore, and the "newer" one isn't as good
 
\o
 

« first day (3200 days earlier)      last day (1742 days later) »