okay, that's more than I expected.. Just plain Ember on its own is much lighter -- I hadn't realised just how many things come as part of javascript builders nowadays.
okay, that's more than I expected.. Just plain Ember on its own is much lighter -- I hadn't realised just how many things come as part of javascript builders nowadays.
Okay I'm having this weird issue with React... shouldComponentUpdate and componentWillUpdate both never get called. The page is rendered and componentDidMount does get called, but I have a console.log in both shouldComponentUpdate and componentWillUpdate but never see it get fired. Anyone have an idea what's going on?
It's a very, very simple web form for resetting a password. A single input and button is all. I'm not sure what's going on...
Nothing like writing soup-to-nuts documentation for your replacement to make you realize how 1. woefully underpaid your where and 2. how happy you've got a new job.
Okay I'm having this weird issue with React... shouldComponentUpdate and componentWillUpdate both never get called. The page is rendered and componentDidMount does get called, but I have a console.log in both shouldComponentUpdate and componentWillUpdate but never see it get fired. Anyone have an idea what's going on?
It's a very, very simple web form for resetting a password. A single input and button is all. I'm not sure what's going on...
this usually means youve got a shouldComponentUpdate equal to false somewhere higher up your component tree, i.e. a parent/anscetor of the component you are looking at.
if a components shouldComponentUpdate returns false, none of the children will rerender either.
Okay I'm having this weird issue with React... shouldComponentUpdate and componentWillUpdate both never get called. The page is rendered and componentDidMount does get called, but I have a console.log in both shouldComponentUpdate and componentWillUpdate but never see it get fired. Anyone have an idea what's going on?
It's a very, very simple web form for resetting a password. A single input and button is all. I'm not sure what's going on...
this usually means youve got a shouldComponentUpdate equal to false somewhere higher up your component tree, i.e. a parent/anscetor of the component you are looking at.
if a components shouldComponentUpdate returns false, none of the children will rerender either.
I wonder if it has something to do with react-router. This component is it's own thing (it's a password reset page, so there's no parent for it).
I check if this state's password and next state's password do not match, if not then I set this state's password to the next state's password.
Then I do validation checks on that. I set validLength = true in my state. By the time it makes it to componentDidUpdate or render it's false. Every time.
Holy fuck @Nogs everything I knew about React has been a lie up until this point.
I thought the entire page constantly rendered with shouldComponentUpdate returning true. But this is so, so not true. Holy fuck. I found out that we have a route handler called SignedIn. This route handler verified that there has been activity between it and the API and logs them out after 10 minutes of inactivity. The previous dev set this to run on an interval. Every 2 seconds it would check, update the state and move on.
All of the stations (except Login/Password Reset) are the children of this Handler.
I thought REACT was the one updating the state automatically every 2 seconds and calling "shouldComponentUpdate" on itself.
God damn it I'm so fucking stupid.
urahonky on
0
Options
NogsCrap, crap, mega crap.Crap, crap, mega crap.Registered Userregular
edited August 2015
huh, that sounds weird.
why would it need to be on a two second ticker?
could there just be like one timer that resets on action or state change and it only logs people out if the timer gets to a certain upper limit number?
edit: unless i suppose you have a ticker server side to keep tokens fresh and need to sync between the two.
even then tho, just have it be on action and not every 2 seconds? dont even have to wait for response to update state. you can optimistically update it and then revert if the response comes back with logged out or something.
could possibly even include a client side timer like i suggested for truly afkers.
Yeah that's what I think I'm going to have to do.... The problem is that this project is due in two weeks and I just NOW found out about this.
It checks every two seconds because that's what he set it to. It basically checks the timestamp of the last Api call. If it's > 10 minutes, it immediately boots you out.
But like, including the text "<div>". The reason for that is that I'm making this page that is pretty much just for me to copy/paste a pull of a certain calendar into a wordpress blog. It's a bit of a weird workaround but it's also fine, it'll save me a ton of time and effort formatting things during the process of input on the page like I do now.
I've tried a bunch of different ways of escaping the frigging gt/lt symbols and none of them woooork and I don't like fooling around with Javascript it's annoying. So what winds up happening is that it reads the <div> thing as part of the page instead of as text that I want to have visible for copy-pasting.
and then find/replacing all the and with < and > in Sublime and THEN copy-pasting from that into wordpress. It's just infuriating to me that I can't figure out how to just output these text frigging characters as text.
But like, including the text "<div>". The reason for that is that I'm making this page that is pretty much just for me to copy/paste a pull of a certain calendar into a wordpress blog. It's a bit of a weird workaround but it's also fine, it'll save me a ton of time and effort formatting things during the process of input on the page like I do now.
I've tried a bunch of different ways of escaping the frigging gt/lt symbols and none of them woooork and I don't like fooling around with Javascript it's annoying. So what winds up happening is that it reads the <div> thing as part of the page instead of as text that I want to have visible for copy-pasting.
and then find/replacing all the and with < and > in Sublime and THEN copy-pasting from that into wordpress. It's just infuriating to me that I can't figure out how to just output these text frigging characters as text.
try & lt ; and & gt ;
so basically
& lt ;div& gt ;
(but with no spaces between &l and t;, etc.)
lt and gt stand for less than/greater than respectively
Me: "Man, I wish I didn't have to use console.log() to debug all these scripts."
Other dev: "You know.. just hit F12 in Chrome, and go to the other tabs-"
Me: "OH MY GOD ALL THE STATISTICS AND GRAPHS AND WHAT'S THIS?? SOURCES? SCRIPTS!!?"
Other dev: "Yeah, just set a breakpoint there and-"
Me: "OH MY GOD IT ALL JUST WORKS I CAN MOUSE OVER STUFF AND SEE VALUES JUST LIKE VISUAL STUDIO I'M SO EXCITED RIGHT NOW"
Me: "Man, I wish I didn't have to use console.log() to debug all these scripts."
Other dev: "You know.. just hit F12 in Chrome, and-"
Me: "OH MY GOD ALL THE STATISTICS AND GRAPHS AND WHAT'S THIS?? SOURCES? SCRIPTS!!?"
Other dev: "Yeah, just set a breakpoint there and-"
Me: "OH MY GOD IT ALL JUST WORKS I CAN MOUSE OVER STUFF AND SEE VALUES JUST LIKE VISUAL STUDIO I'M SO EXCITED RIGHT NOW"
Oh, this is how Ecco felt whenever one of us learned about a C thing
I was honestly really really surprised that they offered me a shot at web dev.
I clarified with them for like 20 minutes going, "You... do know that I'm an embedded developer, right? Embedded is not web. I do C and C++, not C#."
And they're like, "Yeah, yeah, look, we've got a lot of really really good C# devs, and we're fairly certain that you'll pick up C#/web dev quickly enough to contribute to our product."
I'm like, "Okaaaaaayyy.... I mean, this sort of opportunity doesn't just happen every day for an embedded developer...."
I was honestly really really surprised that they offered me a shot at web dev.
I clarified with them for like 20 minutes going, "You... do know that I'm an embedded developer, right? Embedded is not web. I do C and C++, not C#."
And they're like, "Yeah, yeah, look, we've got a lot of really really good C# devs, and we're fairly certain that you'll pick up C#/web dev quickly enough to contribute to our product."
I'm like, "Okaaaaaayyy.... I mean, this sort of opportunity doesn't just happen every day for an embedded developer...."
Proper sprint planning, retrospectives, story point voting for issues etc.
You've got to realise guys - I've only ever read about these things online about good professional software development culture. I've never participated in them before.
Me: "Man, I wish I didn't have to use console.log() to debug all these scripts."
Other dev: "You know.. just hit F12 in Chrome, and go to the other tabs-"
Me: "OH MY GOD ALL THE STATISTICS AND GRAPHS AND WHAT'S THIS?? SOURCES? SCRIPTS!!?"
Other dev: "Yeah, just set a breakpoint there and-"
Me: "OH MY GOD IT ALL JUST WORKS I CAN MOUSE OVER STUFF AND SEE VALUES JUST LIKE VISUAL STUDIO I'M SO EXCITED RIGHT NOW"
now, in your code type "debugger" and refresh with dev tools open.
auto break point without having to set it in the dev tools. can be real helpful.
just make sure you dont commit code with debugger in it.
Proper sprint planning, retrospectives, story point voting for issues etc.
You've got to realise guys - I've only ever read about these things online about good professional software development culture. I've never participated in them before.
This is so... overwhelming, but in a good way!
Can I join you? I'd even consider switching from Django to .net mvc stuff.
I am documenting, for the thousandth time, places where the current project is falling apart due to lack of communcation, documentation, and sane process and what we can do to not fuck this up, yet again, on our next project. The process is mostly artists drawing up UIs without a spec for features (which means the mockup become the spec), understanding of the data and how the UI actually effects that data, or bringing in developers to assist. It will then be ignored due to some belief that "we're special and not doing the same things everyone else is" (seriously, that's nearly an exact quote) and somehow this means that we shouldn't do what works well for everyone else in software development even though what we're doing now clearly doesn't work.
Can I tell you that needs to be 3 shades darker blue, 2 pixels to the left, and a longer shadow? Nope. What I can do is tell you that you better have some sort of field to display and/or edit X, that there's no way to properly associate this data over here with whatever is actually being edited based on that UI, that we need somewhere to manage this other data here, and if we do this idea here we're going to destroy our API rate limits on Third Party API Z in about 5 minutes of being live but here are some alternatives which would work.
Proper sprint planning, retrospectives, story point voting for issues etc.
You've got to realise guys - I've only ever read about these things online about good professional software development culture. I've never participated in them before.
This is so... overwhelming, but in a good way!
My workplace has finally started adopting some of these things.
Now if I can only get my CTO to stop going "Ehhh we don't need to do planning, this is just a tiny console app to do one thing..."
I am currently expanding that tiny console app to support a huge new feature, and I have to refactor all of the code because it's a 700 line Main() function. FML.
Me: "Man, I wish I didn't have to use console.log() to debug all these scripts."
Other dev: "You know.. just hit F12 in Chrome, and go to the other tabs-"
Me: "OH MY GOD ALL THE STATISTICS AND GRAPHS AND WHAT'S THIS?? SOURCES? SCRIPTS!!?"
Other dev: "Yeah, just set a breakpoint there and-"
Me: "OH MY GOD IT ALL JUST WORKS I CAN MOUSE OVER STUFF AND SEE VALUES JUST LIKE VISUAL STUDIO I'M SO EXCITED RIGHT NOW"
It's so god damned amazing.
Then if you work with jetbrain's phpstorm/webstorm you can debug there too.
Not sure how visual studio works with debugging c# web stuff, I guess that's a thing?
bowen on
not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
Me: "Man, I wish I didn't have to use console.log() to debug all these scripts."
Other dev: "You know.. just hit F12 in Chrome, and go to the other tabs-"
Me: "OH MY GOD ALL THE STATISTICS AND GRAPHS AND WHAT'S THIS?? SOURCES? SCRIPTS!!?"
Other dev: "Yeah, just set a breakpoint there and-"
Me: "OH MY GOD IT ALL JUST WORKS I CAN MOUSE OVER STUFF AND SEE VALUES JUST LIKE VISUAL STUDIO I'M SO EXCITED RIGHT NOW"
It's so god damned amazing.
Then if you work with jetbrain's phpstorm/webstorm you can debug there too.
Not sure how visual studio works with debugging c# web stuff, I guess that's a thing?
If you're debugging a website on the local machine, you can attach to the process or the web browser.
If you're debugging an Azure website, you can attach to the Azure website from Visual Studio as long as your account has tenant rights to the website.
Proper sprint planning, retrospectives, story point voting for issues etc.
You've got to realise guys - I've only ever read about these things online about good professional software development culture. I've never participated in them before.
I am documenting, for the thousandth time, places where the current project is falling apart due to lack of communcation, documentation, and sane process and what we can do to not fuck this up, yet again, on our next project. The process is mostly artists drawing up UIs without a spec for features (which means the mockup become the spec), understanding of the data and how the UI actually effects that data, or bringing in developers to assist. It will then be ignored due to some belief that "we're special and not doing the same things everyone else is" (seriously, that's nearly an exact quote) and somehow this means that we shouldn't do what works well for everyone else in software development even though what we're doing now clearly doesn't work.
It's like you work where I am working! Since I work in media, imagine the artists are instructed to work with storyboards as if for a movie, and that's the spec.
Posts
This much
okay, that's more than I expected.. Just plain Ember on its own is much lighter -- I hadn't realised just how many things come as part of javascript builders nowadays.
God I love data visualization stuff.
If I have to edit Makefile.in (or .am) to make your shit cross-compile, HULK SMASH
Praise urahonky!
It's a very, very simple web form for resetting a password. A single input and button is all. I'm not sure what's going on...
Oo\ Ironsizide
i dont know why i punish myself with these smalltalky languages
but i guess you gotta go with what you know
Jasconius knows parentheses?
this usually means youve got a shouldComponentUpdate equal to false somewhere higher up your component tree, i.e. a parent/anscetor of the component you are looking at.
if a components shouldComponentUpdate returns false, none of the children will rerender either.
PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
I wonder if it has something to do with react-router. This component is it's own thing (it's a password reset page, so there's no parent for it).
In componentWillUpdate:
I check if this state's password and next state's password do not match, if not then I set this state's password to the next state's password.
Then I do validation checks on that. I set validLength = true in my state. By the time it makes it to componentDidUpdate or render it's false. Every time.
This is the output:
Here are my functions:
render (since it's longer):
I thought the entire page constantly rendered with shouldComponentUpdate returning true. But this is so, so not true. Holy fuck. I found out that we have a route handler called SignedIn. This route handler verified that there has been activity between it and the API and logs them out after 10 minutes of inactivity. The previous dev set this to run on an interval. Every 2 seconds it would check, update the state and move on.
All of the stations (except Login/Password Reset) are the children of this Handler.
I thought REACT was the one updating the state automatically every 2 seconds and calling "shouldComponentUpdate" on itself.
God damn it I'm so fucking stupid.
why would it need to be on a two second ticker?
could there just be like one timer that resets on action or state change and it only logs people out if the timer gets to a certain upper limit number?
edit: unless i suppose you have a ticker server side to keep tokens fresh and need to sync between the two.
even then tho, just have it be on action and not every 2 seconds? dont even have to wait for response to update state. you can optimistically update it and then revert if the response comes back with logged out or something.
could possibly even include a client side timer like i suggested for truly afkers.
PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
It checks every two seconds because that's what he set it to. It basically checks the timestamp of the last Api call. If it's > 10 minutes, it immediately boots you out.
basically I want this: https://github.com/bradoyler/GoogleCalReader-jquery-plugin
To output the text:
<div>title</div>
<div>date</div>
<div>location</div>
<div>description</div>
But like, including the text "<div>". The reason for that is that I'm making this page that is pretty much just for me to copy/paste a pull of a certain calendar into a wordpress blog. It's a bit of a weird workaround but it's also fine, it'll save me a ton of time and effort formatting things during the process of input on the page like I do now.
I've tried a bunch of different ways of escaping the frigging gt/lt symbols and none of them woooork and I don't like fooling around with Javascript it's annoying. So what winds up happening is that it reads the <div> thing as part of the page instead of as text that I want to have visible for copy-pasting.
'\<div>' didn't work.
'\<div>' didn't work.
'\\u003cdiv\u003e' didn't work.
Right now my very kludgy solution is just having it output
divtitle/div
divdate/div
divlocation/div
divdescription/div
and then find/replacing all the and with < and > in Sublime and THEN copy-pasting from that into wordpress. It's just infuriating to me that I can't figure out how to just output these text frigging characters as text.
try & lt ; and & gt ;
so basically
& lt ;div& gt ;
(but with no spaces between &l and t;, etc.)
lt and gt stand for less than/greater than respectively
PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
I believe that works on the forum, at least <
also just google 'HTML entity list'
youll get stuff like this http://dev.w3.org/html5/html-author/charref which can be helpful
PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
Me: "Man, I wish I didn't have to use console.log() to debug all these scripts."
Other dev: "You know.. just hit F12 in Chrome, and go to the other tabs-"
Me: "OH MY GOD ALL THE STATISTICS AND GRAPHS AND WHAT'S THIS?? SOURCES? SCRIPTS!!?"
Other dev: "Yeah, just set a breakpoint there and-"
Me: "OH MY GOD IT ALL JUST WORKS I CAN MOUSE OVER STUFF AND SEE VALUES JUST LIKE VISUAL STUDIO I'M SO EXCITED RIGHT NOW"
Oh, this is how Ecco felt whenever one of us learned about a C thing
I clarified with them for like 20 minutes going, "You... do know that I'm an embedded developer, right? Embedded is not web. I do C and C++, not C#."
And they're like, "Yeah, yeah, look, we've got a lot of really really good C# devs, and we're fairly certain that you'll pick up C#/web dev quickly enough to contribute to our product."
I'm like, "Okaaaaaayyy.... I mean, this sort of opportunity doesn't just happen every day for an embedded developer...."
Living the dream
This place even does scrums properly.
Proper sprint planning, retrospectives, story point voting for issues etc.
You've got to realise guys - I've only ever read about these things online about good professional software development culture. I've never participated in them before.
This is so... overwhelming, but in a good way!
now, in your code type "debugger" and refresh with dev tools open.
auto break point without having to set it in the dev tools. can be real helpful.
just make sure you dont commit code with debugger in it.
PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
Can I join you? I'd even consider switching from Django to .net mvc stuff.
I am documenting, for the thousandth time, places where the current project is falling apart due to lack of communcation, documentation, and sane process and what we can do to not fuck this up, yet again, on our next project. The process is mostly artists drawing up UIs without a spec for features (which means the mockup become the spec), understanding of the data and how the UI actually effects that data, or bringing in developers to assist. It will then be ignored due to some belief that "we're special and not doing the same things everyone else is" (seriously, that's nearly an exact quote) and somehow this means that we shouldn't do what works well for everyone else in software development even though what we're doing now clearly doesn't work.
Can I tell you that needs to be 3 shades darker blue, 2 pixels to the left, and a longer shadow? Nope. What I can do is tell you that you better have some sort of field to display and/or edit X, that there's no way to properly associate this data over here with whatever is actually being edited based on that UI, that we need somewhere to manage this other data here, and if we do this idea here we're going to destroy our API rate limits on Third Party API Z in about 5 minutes of being live but here are some alternatives which would work.
My workplace has finally started adopting some of these things.
Now if I can only get my CTO to stop going "Ehhh we don't need to do planning, this is just a tiny console app to do one thing..."
I am currently expanding that tiny console app to support a huge new feature, and I have to refactor all of the code because it's a 700 line Main() function. FML.
It's so god damned amazing.
Then if you work with jetbrain's phpstorm/webstorm you can debug there too.
Not sure how visual studio works with debugging c# web stuff, I guess that's a thing?
If you're debugging a website on the local machine, you can attach to the process or the web browser.
If you're debugging an Azure website, you can attach to the Azure website from Visual Studio as long as your account has tenant rights to the website.
This makes me super jelly.
i could argue that every use of react is a misuse of react, but my holy warrior gear is in storage
It's not impossible.
no sprints or daily standups. just tickets and priority shifts.
success is measured by cycle time, not velocity. way more flexible and i feel better for continuous integration.
sprints just feel like mini waterfall to me most of the time.
PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
Adopt me.
It's like you work where I am working! Since I work in media, imagine the artists are instructed to work with storyboards as if for a movie, and that's the spec.
Oo\ Ironsizide