« first day (2160 days earlier)      last day (2779 days later) » 

10:00 AM
god you are persistent... :P
> I explained it. You don't agree.
Nothing else to say
o/
 
No more persistent than you ;-)
 
Anonymous
Are you @Sherif in disguise ? :D
 
Anonymous
oh wait, that won't make sense to you... nvm.
 
If I were, would I tell you?
@JayIsTooCommon wat
 
Anonymous
wat
 
Wes
10:02 AM
guys how much time you spend actually writing code daily? how much time you spend thinking, documenting yourself, writing about @PeeHaa's mom in room11, etc?
 
Anonymous
@Wes differs every day
 
@PeeHaa - Since you are an RO here. Please ensure that random things aren't flagged here. Also, you can kick people in case they do something that isn't acceptable here (or raise a custom mod flag if you can't handle it).
 
@Gordon how is that different than just an interface and a trait in PHP? (other than how difficult it is to reason about the code...)
 
@TheLostMind Seriously read what I said
 
@Wes I'd say half my time is thinking
Then again, I have to think a lot harder than some others
 
10:03 AM
@PeeHaa: you're excusing the mis-use of flags, honestly.
 
Anonymous
no he isn't.
 
I kicked him
 
@Wes Just use ES6
 
@Danack it allows you to create it on the fly, e.g. some_func(() -> { return 42})
 
No need to continue this shit
 
10:03 AM
any one have idea how to store emoji in database
 
Anonymous
lol
 
There's sugar for that in the form of classes
 
or instead just use it's shortcuts keyword for reference?
 
@MadaraUchiha People are even starting to yell at me for overusing it now :(
 
@Wes thinking is part of writing code.. my time spent typing code is far less than my time spent thinking about what it should be.
 
10:04 AM
true paul
thinking twice, code once
 
@Oldskool but dude I am using lampp
:(
 
Anonymous
I think once. Code. Think again, Rewrite everything and so on..
 
That code once is hardly ever true (at least for me)
 
@PeeHaa That's nice. @TheLostMind just told you not to use flags for room rule violations, and you are just dismissing what he said, I call you out on it, and you kick me.
 
@PeeHaa The good thing about it is that you write less code (less boilerplate) for the same meaning
 
10:05 AM
Exactly @JayIsTooCommon
 
@Wes About @Peehee's mom? 0. Now, about Jimbo's..
 
Seriously @Cerbrus. Just stop
I cannot be more clear than what I already have said
 
Wes
@PaulCrovella can you guess an amount of time, on average? i'm almost ashamed to say that i hardly spend more than 2 hours daily writing code, over 8 hours or so
 
The bad thing is that it allows you to code like Java in JS
 
Maybe it's my fault for not communication the right way, but so be it
 
10:06 AM
@PeeHaa thinking thrice, increase thinking until coding decreases to once :P
 
This discussion is useless
 
Wes
except i'm writing css, that's almost zero thinking
 
It's still prototypal inheritance behind the scenes, so you can still pass "classes" around because they're actually functions.
 
@JayIsTooCommon ??
 
who is @TheLostMind? name change or did I miss an election?
 
10:06 AM
@MadaraUchiha That's how I am doing it right now
 
@PeeHaa Then you are overusing it.
At least, in my opinion.
 
3 mins ago, by PeeHaa
@MadaraUchiha People are even starting to yell at me for overusing it now :(
You are not alone in saying just that
 
ah, last election
 
Seriously though, do whatever works. If it gets you to a state of sane architecture that you and your peers understand well
Then it's fine.
Personally, I think you're missing out on a lot of the power JS has if you do things that way.
 
I am at the point: I can always "uglify" it later
 
10:09 AM
Fair enough
 
@Wes I can't, no. It varies substantially. I've had a lot of days where I've worked plenty as a developer yet written no code at all, and a lot where I've crammed in more hours writing than was probably healthy.
 
Just like in PHP, people will tell you that this way is crap and that way is gold. Don't listen, do whatever works for you.
When you learn enough to have a wider perspective, you can see what you should have done differently.
 
That's certainly what's missing atm
 
@Exception Then you should already have apache, just configure a vhost in it for "my_dev" and add it to your local hosts file.
 
@MadaraUchiha well said
 
10:11 AM
What makes it really hard for me is the fast moving target that is called ecma
 
@PeeHaa JS is a very good entry language to many others, because it gives you an alternative perspective on OO (without classes), and a peek at functional.
@PeeHaa Pick one level of standards, and learn it. Most of the stuff that comes afterwards build on that.
For example, async/await is an addendum to the Promise primitives
 
Anonymous
@Sherif You're persistent in arguments, wasn't an insult :)
 
So you need to understand Promise to use async functions, but not the other way around.
History helps, but it's not really necessary
I can get into why Promises are awesome and what was before them
 
@JayIsTooCommon What? What argument?
 
But I don't think that's very interesting and it might not help you
 
Anonymous
@Sherif nvm, the joke has gone now :P
 
It's one of those thing that just didn't properly "click" yet
 
If a constructor 's params are full of optional/nullable value objects, is it worth just changing it to use setters instead?
 
@Sean Sounds rather like you need separate classes
 
@Sean The point of a constructor is to get the object into a usable state
 
10:16 AM
@MadaraUchiha Without the params, the object is still technically usable.
 
If your object is usable without the optional values (as opposed to, I will only have those values later, and then the object will be usable) then yes, you should put them in setters
If the object won't be usable, but the values will only be available later, then keep them in the constructor and construct the object later.
 
Well, it's kinda 50/50. If you submitted it with no params, it passes spec validation, but fails on a business logic level.
I'll figure something out, thanks for the help you two ^^
 
Wes
@PaulCrovella the more experienced i get the harder it becomes solving problems, because with experience i think comes also pride. i convinced myself i can plan everything in my mind if i put enough effort into it, while trying and failing, even multiple times, would probably be much easier and probably get me to the goal faster. and it's actually much worse than that. i do neither of the options, i spend my time trying to figure out what the faster and less exhausting option is -__-
 
0
A: Override default xml in Magento 2.1 for header customization

phpuserYour xml path in the module is incorrect.It would be like, vendor/magento/module-theme/view/frontend/layout/default.xml to app/code/my_module/my_project/view/frontend/layout/default.xml .

 
10:19 AM
@Wes I've passed that point. The conclusion I've made is that you can't plan for everything, so you do something acceptable, you make your test coverage excellent, and when you need to refactor (that's a "when", not an "if"), you can within reasonable ease.
 
@Wes What I often get "lately" is that I question every single fucking thing I do to the point I cannot write code anymore :P
 
Wes
@PeeHaa i know that feel bro
[bro hug.jpg]
 
<3
 
BTW that's mostly for personal projects though. Paid I am more relaxed
@MadaraUchiha Your image is bad and you should feel bad
> Oops! Error 404, unable to process image
 
10:21 AM
@Wes the thinking I'm doing is only partly planning (probably not enough); but largely figuring out how something fits into a whole, where the edge cases are, what other sorts of impact a change might have, whether the problem I'm solving isn't just a symptom of something else that I should be solving instead (along with that impact, how to get there, etc.), and so on
with greenfield projects it's a bit simpler, but I'm usually working on something with preexisting context
I'm also a little weird in that I don't prefer greenfield projects. The added constraints of existing systems, legacy code and whatnot, spurs a sort of creativity I find rewarding.
 
That is weird
Although that might very well be a good thing to have
(although weird :P)
 
Wes
i think i have that problem too :B i don't have "preexisting contexts" as if i figure out a way to improve something, even if it involves changing the world, i'll be forever tempted to do it. and if i don't, i will sabotage it, my own work, somehow
 
Well yeah but we already know you are weird :P
 
Wes
....subliminally, of course :B
 
@Wes Do you use something like babel btw?
 
10:32 AM
morning
 
morning niki
 
yormin
 
morning joe
 
moin Joe
 
@Wes that "improve something" bit is big for me.. I enjoy making a thing suck less more than I enjoy making a new thing that's good (though that's nice too.)
 
Wes
10:34 AM
i call it the "car scratch paradox". you buy a new shiny car. when you get the first scratch it's a tragedy because the car isn't perfect anymore and it almost makes you cry, but then after scratch number two, you don't give a fuck anymore as you are just waiting, consciously or unconsciously, for it to die so that you can get a new shiny car
2
 
@Wes hehehehe
 
Wes
it's true
 
It is
 
/me tips hat
 
Wes
hey joe
 
Anonymous
10:35 AM
moin
 
(I have no hat)
 
Wes
wait, i thought you were british @JoeWatkins
 
yo yo
 
Wes
do you at least have a monocle?
 
of course, but I consider that official uniform, only to be warn when drinking tea with the queen at buckingham palace
 
Wes
10:37 AM
:P
 
@Wes no, it's sorta the opposite for me. I already don't care about the scratch. I like keeping what I have running well. I like setting things up so my car stereo automatically plays music from my phone via bluetooth when it connects. I've little interest in a new car at all.
 
I was hoping it was gonna be friday today ...
 
@JoeWatkins M'Dev
 
@JoeWatkins Same :(
 
model factory is injected in each controller and this model factory will be responsible for creating models rightt? and what this model factory actually is and what it contains? @tereško
 
10:39 AM
@Linus there is no such thing as "model factory"
 
@PeeHaa we will have to hope harder, and more thoroughly, if we're going to make this happen ...
 
> uses model factory to create new models
 
Wes
@PaulCrovella you are lucky :P i think i hate working on any project i made that i think it's not as good as i think it should be.
 
you think too much
 
Wes
10:40 AM
maybe hate is the wrong word... i'd say, i find it less appealing
@JoeWatkins indeed
 
I haven't figured out what you said ... not a fan of puzzles ...
 
Duh, I can't remember how to fail from a clone object handler in PHP5... anyone?
 
what is PHP5 ?
 
@Linus please not taht it was written in 2011
 
Wes
what is a clone object handler :P
 
10:41 AM
@JoeWatkins 8]
 
I recall MULTIPLE TIMES telling you that many of my answer are very outdated
 
Anonymous
man, caps and bold. That's just harsh :(
 
it's the shit I wrote when I had recently discovered Kohana
 
lol
 
Wes
10:43 AM
wasn't tereško born with MVC coded into the DNA?
 
(throw an exception)
 
people like that are reason why I want to nuke all of my answers that are older than 2 years
 
Yeah me too! Oh wait I can only blame myself for the crap I wrote 5 years ago :(
 
:(((
 
@PeeHaa I also blame you for the crap I wrote 5 years ago.
3
 
10:45 AM
hehehehe :D
 
Wes
lol
 
@JoeWatkins But php-lxr.adamharvey.name/source/xref/PHP-5.6/Zend/… is the actuall call
Maybe I have this weirdo "return something anyway" code in there because of that...
 
@tereško that actually to some extent..
 
@PeeHaa well ... I was making fun of it, not learning php from it
 
is that one stackoverflow.com/questions/5823090/… outdated too?
 
10:49 AM
yes
 
@tereško True. There are only two things to do. Saying "meh" or writing new answers :P
 
@tereško Time to start adding "This is outdated" disclaimers at the top?
 
@NikiC that might be a good solution
 
sudo yum install tersko mvc
 
@tereško Well without anything that's not outdated it's nice to have a warning, but useless for people finding answesr
 
10:50 AM
... and add a patrion account to collect funding for update
 
But but but... rep!
 
@NikiC We could just add that to the top of all Q/A :P
 
Anonymous
And a disclaimer on all PHP SO docs 'Just read the fucking manual'
 
Anonymous
@Linus Do you just look for @tereško's answers or do you just come across them when searching for MVC ?
 
@JayIsTooCommon both :P
for now i have pinned tereško and Jimbo profile and reading answers
 
10:55 AM
need help in codeigniter framework ...... When I print sql query and run in phpmyadmin, It working fine. But when I use $res->num_rows() , it gives me 0
 
Anonymous
Well relying on answers from 2011 is probably going to be problematic, best to just search for an answer to your Q instead of a specific user :P
 
dnt know why???
 
show query
 
$res = $this->db->query("select * from ei_admintable where username = '".$whereData['username']."' and password = '".$whereData['password']."'");
$whereData['username'] = $this->input->post('username');
$whereData['password'] = md5($this->input->post('password'));
 
github.com/pcrov/JsonReader/issues/2 feedback please if anyone cares much about particulars of json handling.. @PeeHaa ping because you have opinions on things even though they're sometimes wrong
 
10:58 AM
@upcomingdeveloper dont use codeigniter
@upcomingdeveloper dont use md5 to "secure" passwords
 
my project is in codeigniter
 
@upcomingdeveloper dont use string concatenation for queries
 
all of that stuff, and whatever else he says ...
 
:D
 
Please help if possible
 
10:59 AM
@upcomingdeveloper also, isn't the username already unique enough
 
I have only one row in the table
 
(md5 is a broken/cracked hash standard, and therefore insecure. Use SHA1 at least, or use password_hash if you can. Use prepared statements to prevent SQL injection attacks, where query input data isn't escaped, it can allow a client to altar the SQL query structure based on the input which is worse than it sounds)
!!docs password_hash
 
[ password_hash() ] Creates a password hash
 
I will, but right now I have to enter in the backend with this md5 security
i am unable to enter in the project
query is working fine when I run on the phpmyadmin
but $res->num_rows(); gives me 0
 
Can you confirm $whereData contains the correct data immediately before the query?
 
11:06 AM
@sea
@sean yes
 
Huh, didn't know partial user names still pinged.
 
@all is the bain of my ChatOverflow life
 
And all the other basic stuff is set up i.e. connecting to the database, the correct database, referencing the right fields, etc.
 
3+ chars will do it ...
TFW you are asked to help with code with serious problems ... but they just want to fix one window ... https://t.co/KM5HEOtvKc
 
11:12 AM
@PaulCrovella suggested behavior looks reasonable
 
¯\_(ツ)_/¯ Without having more information I can't help you I'm afraid. If all of what you said above is true then I don't have much of a basis to continue on.
 
!!eval echo hexdec(dechex(-2905427609299790790));
 
hm...
I wonder if I will be brutally murdered if I apply an indentation fix to print_r...
 
depends on how you intend to indent
 
11:23 AM
@NikiC Thank you. It can be hard for me to tell if my head is too far up my ass over edge cases.
 
return +$buffer reminds me of the awful JS bool conversion with !! :P
 
@NikiC should that result up there be like that?
 
@pmmaga That's a bad habit I need to stop doing :P
 
@Gordon no idea
@Gordon ah ... dechex works on integers
 
I had expected it to return the input
 
11:29 AM
@pmmaga it did feel a little icky to do, yeah :p
 
@Gordon Ah, problem is the negative number
It represents it as an unsigned hex number
 
that is a bug, is it?
 
Wes
@NikiC we'll defend you!
 
ah, there is even a note in the manual
> As PHP's integer type is signed, but dechex() deals with unsigned integers, negative integers will be treated as though they were unsigned.
crap
thanks @NikiC
 
11:35 AM
@Gordon That's a shame. It looks like it could be a relatively simple fix
 
tbh negative hex makes no sense
 
@NikiC Why? How do you represent -15 in hex?
 
@pmmaga For the things you use hex for, you represent it as 0xffffffffffwhatever
I haven't ever seen such a thing as -a0b anywhere
 
hashes upon hashes, little confusion. Should I be hashing a password via php and then have database do a sha2() ?
reading an article, and it's got me fukd up
 
@Darius you hash only in php
 
11:39 AM
Cool.
then I'm good lol
 
using password_hash
 
@NikiC makes sense
 
thanks Niki
 
@NikiC it's very unobvious though
 
@Gordon especially the fact that hexdec does not convert back to a negative number
they should at least behave consistently
 
11:49 AM
@NikiC yes
 
but, php.
 
@NikiC how would it know?
 
i think that the fact that dechex(-1) returns 'ffffffffffffffff' is the issue. Yes, that's the machine representation. But for humans, it's still -1.
 
-82
A: How is this "question" not spam?

TheLostMindI can't say for sure but some reasons behind not considering the post as spam might be: User has other decent questions and answers. User account has been there since 4 years. User has never been warned for spamming SO. That might have made some mods think that it was not "exactly spam" b...

oh that explains it :P
I knew I saw the name before :D
 
@PeeHaa remember it's up to you to somehow prevent us from flagging things
 
11:58 AM
@PeeHaa what are you being pissed about ?
 
@tereško The nonsense @PaulCrovella just said :P
 
oh .. right
 

« first day (2160 days earlier)      last day (2779 days later) »