« first day (2907 days earlier)      last day (2265 days later) » 
00:00 - 19:0019:00 - 00:00

Wes
Wes
00:28
@tereško what do you think about the "functional" style of getting rid of the "get" prefix?
01:11
omg
my boyfriend's programming instructor doesn't want him to add spaces... so for(;num%divisor!=0;divisor--) shouldn't look like for(; num % divisor != 0; divisor--), and his instructor docks points on it
WAT
@Tiffany Soundsaboutright.Imeanspacesshouldntexistsanyway.
I'm trying to find something from Uncle Bob about readable code and having spaces, but only thing I can find is "follow the team's style" which doesn't argue my point :|
How about every beautifyer in any IDE or online ever will put spaces in?
Ooo. Make a bot that scans all of GitHub and StackOveflow and find the # of for loops that use spaces vs the ones that don't.
he has to use netbeans
can't even use a free copy of IntelliJ, since he's a student
it's BS
never understood the purpose of teaching in unrealistic environments
maybe make the teacher feel they have a purpose
01:23
one of the reasons I dropped out of the only web design or whatever sort of class it is I've ever tried taking... bad practices everywhere, and it was the "advanced" class, but it was doing stuff like in-line styles and shit
Well I wouldn't be taking the class I am now if I didn't have to.
Wes
Wes
@rtheunissen forces 80 chars everywhere except use; statements github.com/Netmosfera/Sniffs/blob/master/src/NetmosferaSniffs/…
of course there's more to do, in case you have any ideas just ask
for example i want it not to warn if the line contains a very long url, which cannot be split
and there's also use Foo\Bar as Baz; to support
who the fuck calls parentheses "wings"?
Wes
Wes
i do, since now
haha
Wes
Wes
01:27
sounds bad ass :B
Wes
Wes
01:37
i start to regret that i did switch to 80 characters lines
it's just not enough
go back to 92
Wes
Wes
nah too late, not doing that again lol. i just changed 200 files for no reason basically
$escape->preceedsEOF() is not english
precedes is
yup
you're thinking proceeds
Wes
Wes
yes. damnit english
wonder if there is a reason the verbs are so similar. they are both about movement
01:53
the name "NetmosferaSniffs" sounds so wrong
Wes
Wes
procedere and precedere
Netmosfera sniffs what?
Wes
Wes
i just followed the naming of other "sniffs" :B
and it's not a verb, it's plural of noun sniff
... :B i didn't decide it. other libraries call it that way
@Wes sniff isn't a noun. But in the context of "code sniffs" it's a tool that "sniffs" through code, it's still a verb.
like a police dog sniffs for drugs
Wes
Wes
hm
01:58
anyway, bedtime, good night
Wes
Wes
\o gn
making coherent sentences is hard
 
1 hour later…
Wes
Wes
04:11
lines of code are conspiring against me. i set the hard wrap at 80 chars and most of times code exceeds 80 just by 1 - 3 characters -__-
damn 90 was perfect
04:29
nn
Wes
Wes
04:46
\o
 
3 hours later…
Wes
Wes
07:19
did you guys get the hacktoberfest t-shirt last year?
morns
If your future self visits you in the present, and you kill him/her, is it murder or suicide? #mega6382'sShowerThoughts
07:42
Hi , I used Postman for Post request , it generated a php code using pecl_http , i tried to run same code of localhost , but getting error ....
Uncaught Error: Class 'http\Client' not found
i downloaded the pecl_http package from packagist
but couldnt find how can i include it , it doesnt have autoload.php file
@mega6382 murder, according to physics (its from a different timeline)
@tereško lets say there are no, alternative timelines or anything.
you misunderstood what is required to travel in time
@tereško not necessarily, this is at best a hypothesis, but i would file it under sci fi.
traveling in time to begin with is "under sci fi"
because current;y we only can alter one's speed for moving forward in time
07:55
@tereško ok, but then it would imply, that there can be many other rules that can apply, not just these, or not these at all.,
you might be interested in theses two videos, @mega6382:
08:36
o/
@Wes was supposed to but they never sent it out :<
I have my one from 2 years ago still though
09:09
what's going on
If you use late static binding, clearly murder.

Morning.
@tereško thanks
@Tpojka :P
here murder is going on?
@ArifulIslam I don't know what you are talking about, who said murder? there is no murder here, do you have warrant? :P
I am not police officer. Ha ha
09:42
how to display 2nd selectbox value fetching from table. based on 1st selectbox value selected value in php
i searched a lot but i got some javascript examples
@hearthacker It's (and its answer) is too much for chat use.
Is this what you are asking for?
10:18
@Gordon Brb moving to Munich in Jan
Since the most of questions are asked in our Telegram groups, we're making a telegram-bot (will be added to the groups) which adds the messages contain #question hashtag as a new question in our database and replay-messages with #answer hashtag as the answer its parent (replied) question. The issue is about users table .. all those kind of Q/As will be published anonymously. Is it ok in your opinion @tereško ?
are you not afraid that it will create a huge moderation problem?
even, if you ignore the user-issue
and the solution is quite simple: if the author_id for the answer is NULL, then you render the user as "Anonymous" (preferably in some different color)
in gray-color and not clickable (since those anonymous users don't have a dashboard)
yes, kinda
but I am not all that sure it is a good idea right this moment
you need better moderation tools first
and I do not recall how far along you had the flagging system developed
well we have a great flagging system which is fully-functional right now
those flagging system works according to user's role
10:31
every time you describe something as "great", I loose a bit of confidence
4
if a user with low-rep flag a post, it needs to get more flag-votes (by other low-rep users) to get removed (or even closed). But if a moderator or an high-level user flag a post, it will be removed (closed) immediately.
the flagging part is not the issue that I am concerned about
it's the ability to review existing flags
I see what you're saying ..
we have to hire some guys (even from our current users) to take care of the published data
:(
no, you need better tools
and you need to "grow" internal moderators
do you mean something like SO ? users with more than 2k rep be able to review flagged posts?
10:34
maybe
well implementing that seems hard (time consuming)
6 mins ago, by tereško
you need better moderation tools first
you will have to do it eventually
anyway, I'm AFK
ok .. thx
10:57
mornin
I've got a question and an idea, quite often I write toString() method in classes and then also automatically __toString() with fcall to first or the same body, wouldn't it be better to introduce method aliasing into the language?
I know this is only one example which had in my mind but this is ridiculous to implement both
And there is no other way to check if object of a specific class can be converted to string other than checking if __toString() method exists - which is ugly expression IMO
SELECT u.name,u.id
,pro.state
FROM users AS u
LEFT JOIN processes AS pro ON pro.user_id = u.id
but processes not return the most updated record even i try order by
it return middle order record
what you're saying doesn't make any sense ... you don't use LIMIT clause, so, all result should should be returned .. if something is missed, it means it is not even matched in your query
yes this not real query i use WHERE FIND_IN_SET(u.id, @ApplyAppliciant)
number of user_id return
number of user has number of process but i need the most updated process of each user in join
if i set limit so return only first user @Shafizadeh
@Shafizadeh
TBH, I don't understand what you want ..
If you give me the table structure and the expected result, I can write the query for you
11:29
hi i want to change my email id of stack overflow account any one know??
class Foo {
    public function __toString(): string {}
    public function toString = __toString;
}
function foo (): string {}
function bar = foo;
^^ does it make sense to you?
just read that for( i = num; i != 0; i -- ) is faster than for( i = 0; i != num; i ++ ), can someone explain, whether its true or not and if so, then how?
11:48
when i print console.log(response); in ajax response.
it displays as the following json format in console
[{"name":"ultra"},{"name":"flex"}]
but i want to store the name into select box option
i tried the following but it displays undefined inside select box option values.
https://pastebin.com/8pia84k3
@mega6382 hmmm... In PHP? Either way I doubt it, where did you find that?
@pmmaga somewhere on the internet, anyway, the explanation there was this
> This has to do with the provision of a Zero flag in the CPU.

For a decrement loop, the CPU directly checks the zero register flag for 'i' everytime,
whereas for an increment loop,
the CPU subtracts the two values ( i and num ),
discards the results and then checks for the zero flag which means more machine cycles and thus a tad bit slower
@mega6382 it sounds plausible, but if so I guess most compilers will invert it for you where possible
hmmm, interesting
12:03
morning
@Tpojka ok, i don't get it
below this code, wtf is fdfdfd method? (I'm guessing it's getFirstMethod, but lolwtf
@tpo
@Tpojka
SELECT u.name,u.id
,uS.status,uS.id AS appId
FROM users AS u
LEFT JOIN user_status AS us ON us.appliciantID = u.id
WHERE us.jobId = 103
GROUP BY u.name
ORDER BY appId DESC
@Noni 42
12:32
query does not return the user_status updated record
@Tiffany I am not sure what you expect to gain from that article :(
this is a curious tutorial, developer.ibm.com/tutorials/mo-php-todolist-app, not sure what the quality of it is, only skimmed through it. Uses Slim framework.
morning!
@tereško gives me some ideas on cleaning up my crap
assuming I don't get "reminded" of another priority
@Tpojka I still don't get how the joke is funny, anyway whatever.
12:34
well, it's not actually your crap, which happens to be a part of the problem
@tereško it's my crap now :(
@Noni Try to change uS to us. I am not sure if that can make change though.
@Tiffany from what I can assume about the codebase, you best option would be to start migrating it to singleton-driven code
@tereško I sent you a link on discord
it will not be the final state, but it will let you start imposing SOME structure
12:37
if you're curious of what it is I'm working with, lol
@mega6382 This is how that guy should behave on stage.
@Tiffany I will take a look at it in the evening (I am currently at work)
@mega6382 there's a lot of play on words with "Enter Sandman" in the US
kind of meme-ish
I think if I knew anything about the guy in tweet, I might be able to get it better.
@Tpojka no :(
12:40
@mega6382 Metallica was one of the first to denounce Napster here, as well
...18 years ago... good god
@Tiffany Don't talk to me about ancient historical events, i am barely over 20 yrs old :P
I just remember using Napster back then... on stupid dial-up... it took like 30 minutes to an hour to download a 5 MB file
now my phone does that in seconds
@Noni I will believe that is related to your query issue. remove aliases at all and try. If doesn't work post error you get.
@mega6382 I was lucky to get 5 KB/s... lol, 6 KB/s or 7 KB/s was unheard of
@Tiffany yeah, I remember my father using the dial too, he would often just be waiting there for a while just for 1 image to load. :P
12:45
@mega6382 yuuuup
a coworker was still on dialup up until like three years ago, when her ISP switched her to DSL or fiber or something
lol, really?
yup, she had no use for cable internet speed at the time
I can't wait for typed properties...
no need to write getters and setters anymore
@Tiffany yeah, me too, but i am still sore about that 1 no vote
OH: "Code beautifiers promote unrealistic beauty expectations"
search for an issue with phpstorm and the first result is a forum post of where to download the program, and a key cracker...nice...
scratch that, most of the results are pirating sites
@Tpojka
SELECT u.name,u.id AS userid
,us.job_process_status,us.job_process_status,us.id recurmentID,us.updated_at
FROM users AS u
JOIN user_job_apply_recuritment_status AS us ON us.appliciantID = u.id
WHERE us.jobId = 103

ORDER BY us.updated_at DESC;
and SELECT u.name,u.id AS userid
,us.job_process_status,us.job_process_status,us.id recurmentID,us.updated_at
FROM users AS u
JOIN user_job_apply_recuritment_status AS us ON us.appliciantID = u.id
WHERE us.jobId = 103
GROUP BY u.name
ORDER BY us.updated_at DESC;
12:59
Unreadable in chat. Sorry.
when adding this problem cause
:(
Please use Jon Skeet's advice of how to ask perfect question and post a question on SoF.
@Tpojka thank you so much
GROUP BY u.name
ORDER BY us.updated_at DESC;
if i remove GROUP BY u.name
it produces perfect but repeated value
@Tpojka SoF?
Stackoverflow. Should be SO. :)
13:13
@mega6382 so basicly you're just still a baby? ^^
@Naruto for all intents and purposes, yes. :P
omg I'm a dumbass
nevermind, @Wes, I figured out what I did wrong
<?php

?
@Tpojka ...yup
:D
But I like description though.
13:28
I've learned to be thorough when requesting support
Now I have to remove that new file from my project here. :D
@Tiffany I agree good question and knowing what you need (and what is plausible if that is possible to know too) is half of solution.
@Tpojka this is a question I'm a little proud of writing, I'm not proud of my solution (answer), but I couldn't find anything else under Windows to fix it
anyone here can help me bout revel (go lang frameworks)?
@hfbachri_ that doesn't sound like a PHP question...
@Tiffany haha yes, I didnt find the Go Lang forum here
13:36
@hfbachri_ either way, "Don't ask to ask, just ask."
@hfbachri_ see guide.room11.org
@Tiffany Wether I never did it, I actually learnt that vendor directory (probably?) can't be created manually. Something one wouldn't try like never. And thank you for that. :)
But another question arises. Ubuntu (for example) always insist you shouldn't use root. Why Windows behaves the opposite?
@Tpojka I just found it bizarre, I had to run command prompt as administrator for composer to do stuff, I would think there would be some kind of group I could apply to make it work. But I suppose, a lot of things in Windows require "Run as Administrator" to work correctly in cases like this.
@Tpojka I think the recommendation is to not log in as root. Log in with your own account, and switch to root if necessary.
otherwise, use sudo
I feel like what I was doing in Windows kind of like running the sudo command
Morning.
Actually this is the message with sudo:
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Applies for both.
^^ Morning.
nevermind, I thought someone else was messaging me
13:45
Sven was right I think. That sounds like a file permission error.
he probably was, but I couldn't find anything by googling that would indicate what I needed to add to make it work
I have no idea with Windows.
I don't deny that there is truth to his comment, he's correct, but in context I dunno if there was anything else
@Tiffany my guess would be that the root folder belongs to the webserver user. if you can run the CLI with that same user, running composer install should be fine
@pmmaga I can't login with that account, if it exists. I have a domain admin account that I use to log in to servers on the network, though.
13:48
composer executable path is set under Admin. You should set that under regular user.

http://webdevzoom.com/wp-content/uploads/2016/07/The-Environment-Variables.png
Is there note an equivalent of su SOME_USERNAME in Windows?
@Tiffany alternatively, also give read/write perms to your unprivileged user on that folder
I know that Windows and IIS use the IUSR and IIS_IUSRS accounts extensively, I think I tried adding read/write/execute to the vendor folder to one of the accounts that IIS uses directly, I think IUSR, but that did not work. I did remove the permissions afterwards.
I believe IIS_IUSRS is used as what is accessible publicly, and IUSR is the account IIS uses to do admin stuff
I know too much about IIS :<
14:01
Also user that runs PHP processes should have composer.exe in it's PATH, I think.
hmmm, I thought I had it system level, but maybe I didn't? ... you might have something there, I'll have to test it at some point
@Allenph slightly
@tereško There's quite a few good History channels on Youtube I've found.
you mean, "Ancient Aliens" ?
:D
Sorry, I'm on a normal keyboard now from a mechanical and I keep messing up.
14:08
my opinion regarding History Channel has deteriorated significantly
Surprisingly no. Also surprisingly there's a bunch of people in the comments with really articulate corrections.
I meant YouTube channels. Fuck the History Channel.
@Arturo Don't spam stuff in multiple rooms.
@Wes I don't wrap function signatures, btw.
Also, that public modifier is 100% unnecessary and is contributing to column count bloat.
Curious...what do you mean by "wrap" function signatures?
If they are "too long" I don't reformat them to span multiple lines.
Figured. Just making sure it wasn't the name of some magic trick I didn't know.
@tereško @Allenph can I get your opinions? two of the global variables are $error, and $error_counter in the original file. Based on @Allenph's example, I would make these private inside the class and initialize them in the constructor. Passing an error message and error counter to a class constructor feels all kinds of wrong, but I'm having trouble mentally connecting the dots to do it better.
I keep thinking of defining another method to handle the errors strictly... maybe that's how I should do it...
I would move them to a static "service", that handles error states
making "Globals" class seems quite stupid thing to do
there's already a display_errors function in the original file and will spit out whatever's in the $error array, other functions add to that array instead of calling another function
@tereško that was just an example name
instead of using Foo
my suggesting is focus on congealing some functions in logical static-classes, with variable exposed for replacement of globals
that is an incremental change, on which you will be able to build atop
this approach would have two immediate goals: creation of some basic structure and introduction of autoloading
can you give a simple example of what a logical static class would look like?
is it just like a one liner return $someVar;?
14:44
I agree. I would prioritize making the functions better and moving procedures into functions or objects before worrying about the DTOs.
I'm too rough around the edges regarding writing classes in PHP because I keep forgetting little things. I need to practice writing more.
But you seemed focused on the DTOs, so...that is definitely one way you could fix those and save the function stuff for later.
pleases, stop mentioning DTOs
@tereško Except for this. Why are you telling her to build a static?
@Allenph how many large legacy codebases have you refactored?
14:46
Did you mean "you"?
currently, my goal is to turn this into a stupid god object, and if I have time, break it down into smaller parts, but I doubt I will
Like how many have I refactored>
@Tiffany that will backfire
compared to what I have already?
14:47
As will building statics. Cough Cough
ya know, I don't care
@Allenph it's all on you now, since you are sure confident, that you know how to refactor an enterprise scale clusterfuck ... have at it
I have a very vague idea of how I can move different functions in separate classes, but it's not strong enough to feel comfortable doing it yet, and I figure as I continue to work, I'll think of methods that can be grouped together in their own class
like "hey, these seem similar... I'll put them in their own class..."
Oh, quit whining Teresko. I can express my opinion without believing I am God.
4 mins ago, by tereško
@Allenph how many large legacy codebases have you refactored?
you still have not answered
@tereško I have refactored like 7, i think(with a team of course)
14:51
I don't know what you consider large, but probably zero.
I'm not sure I'd call this large... sure the file is 700-800 lines, but overall I don't see the entire project as a large codebase
I have refactored a lot of legacy code though. That said, most of it was before I knew much about SOLID.
that was question only for @Allenph, since his first instinct seems to be pushing the DDD bullshit
Definitely wasn't. :p
A random Thought: So, let me get this straight, the programmers that went to university think that the ones that didn't went to university are incompetent and all those that didn't went to university think that all that did are incompetent. Right?
Wes
Wes
14:53
morning
@Tiffany One sec. I'm in a meeting but I'll do my best.
yo wesmonster
@tereško hmmm, ok, so, to what extent do you think thats true, if at all?
@mega6382 people who want to feel superior
maybe they have an inferiority complex
14:58
it applies only to programmers, who have just left the university (think: first job) ... as for the second part - depends
you do not need to think that everyone is incompetent to assume it as "default", because then you already have a plan for "worst case scenario"
it is a lot easier to adjust, when you realize, that someone is competent, than vice versa
@Tiffany maybe, but i am talking more on the lines of, when those who went to college talk about self-made programmers, and say how they are only familiar with their specific field of practice and don't have much general knowledge about computers etc. And how self-made when talking about those that went to college think that they know more theory than have practical experience etc
depends on the school (and not just what you were though but also what the general environment was)
In my (limited) experience there's a lot of truth both ways.
My uncle was self taught and my dad went to school. My dad knows a lot more about like diagramming out logic gates and that kind of thing, but my is definitely a better programmer.
But then there are self taught people who are basically just slamming stuff together with no real knowledge of how it works...
^ I had half of class like that in university ... maybe even 80%
I should not make changes to HTML without syntax highlighting. I end up with shit like class="blahblah"> at the top of a web page...
15:06
I mean SOLID gives you a guideline but doesn't necessary tell you how to make that decision.

The way I think about it is that there are religions on top of SOLID, like DDD, that try to give you training wheels for how to answer those kinds of questions.
But like Teresko says, that's kind of limited by the nature of always using the same strategy to answer those questions instead of just knowing how to do it the right way.
@Allenph the problem is, I understand the theory (mostly), but applying it is where I have trouble
In your case I would focus on making sure I had pulled concise functions from my procedures first.
it's kind of like how I can't design anything, but I can critique another's design
but again, the reason why I have trouble applying it is I do not have enough experience applying it, which is where more practice comes into play
Well, take a page out of Wes' playbook.
"You will never figure out problems in your head unless you face them with your keyboard." ~Wes
We could sit here and talk about it like Wes did with me for hours and hours day after day, but it doesn't really click till you just try it and start asking more specific questions.
yeah
should I worry about what I should make methods: private/public/protected or just start with them all public at the beginning and come back and revise them where I think they can or should be protected/private?
15:17
Personally I like to plan that kind of stuff out at the beginning.
But obviously sometimes it changes throughout the life of the code. Personally I find almost all methods are public. the only ones that aren't are helper functions usually and it should be easy to tell whether the function will ever get used in the wild.
by looking at a function, I can't tell whether or not I should make it public or private, I'm not sure how making a method private will affect the rest of the program
I mean, sure, I will test
@Tiffany Does this method help this class achieve a behavior or is this method a behavior of the class?
@Allenph alright
It may be better to first focus on consolidating the code to functions, then moving those functions together into classes.
15:32
@Tiffany people usually do it the opposite way, start with all private, and only change to public/protected when there is a need.
alright, I'll try that
16:15
this is a sample from a function I'm working through, I noticed that the original developer defined $row = 1 in the for loop, and then uses a bunch of $row-1 when interacting with the array... is there any reason I should not change $row = 1 to $row = 0? Skimming through the code, I can't see any reason why I couldn't, but I'm not sure if there's something I'm not thinking of that could break it.
it just seems really silly to define it as 1, then use -1 throughout the code to accommodate
Wes
Wes
is there a shortcut in phpstorm to invert two arguments in a function call? for example
foo(123, 456); to foo(456, 123);
without doing refactoring, just switch em
@Tiffany or was there something in PHP 4 that was finicky about arrays and off-by-one errors? cause I think that's when this code was originally written
Wes
Wes
for($row = 1; $row < count($csv); $row++) {
count starts from 1, while array index starts from 0
Wes
Wes
for($row = 0; $row < count($csv) - 1; $row++) {
with this you can get rid of that "-1" everywhere
16:21
thanks
Wes
Wes
that code is wrong though, $csv is never used
is this what you are debugging? :B
#sherlock
Wes
Wes
16:39
check your gist @Tiffany
i'm not entirely sure that's the intended behavior, but should be
17:05
I know what the other programmer has written could be improved, but it works right now, and I need to keep the changes I make to this project small right now. Otherwise, I'll get stuck somewhere in between and will be unsure of what to do, and my supervisor will give me a "I told you so"
I'm not making any changes to the current business logic, is my point. If I have time after I convert this to a class, maybe.
^ convert this into a class, and write tests for it
Wes
Wes
but that code does nothing, literally
all the changes it does go to nowhere
@Tiffany Start with extracting parameters and return types of methods. When you know those you can write meaningful class(es)? with no headache.
18:18
@Wes because it's just a snippet
I did not include the entire function
Wes
Wes
aaaaaah ok
did the video help with discovering some phpstorm functionalities, at least? :B
18:38
@Wes sorry, haven't watched it yet, just got back from lunch, then help a student with an issue
@Wes when you were changing between $oldRow and $newRow, were you copying/pasting? or were you pressing something on your keyboard?
Wes
Wes
copy pasting, ctrl+c ctrl+v
ah
you made it look fluid :P
Wes
Wes
not many know this but you can select words with double click and hold. wait
single click selects text by letter, double click selects text by words
neat
18:55
@Wes Tripple click selects the line.
Wes
Wes
yep
Amazon is really cracking down on DVD sales from 3rd party sellers.
People still buy DVDs?
lol- quite a number surprisingly.
I think Amazon may be desiring to drive all 3rd party sellers away- maybe they are tired of dealing with that part. They increased fees by 60% last year in a sly way and then they eliminated 3rd party sellers from selling new DVDs- now they are cracking down on used DVDs.
00:00 - 19:0019:00 - 00:00

« first day (2907 days earlier)      last day (2265 days later) »