« first day (1645 days earlier)      last day (3296 days later) » 

12:03 AM
@ApathyBear Buy a server and colocate it, or get a managed VPS if you dont want the hassle. Managed is $$ but the best route for anything serious
 
 
1 hour later…
1:26 AM
Hey ppl is there an online code review forum or service, somewhere where you can post a working JS/html page and get good online feedback?
 
1:36 AM
 
2:36 AM
@Shmiddty @copy Not sure why I'm beating Python so much (that's usually my benchmark :-)). My solution is very simple. golf.shinh.org/p.rb?Backticks+to+Brackets
Any Pythonistas here?
 
We discovered a simple bug in one of my projects today that has far-reaching implications and affects a lot of people in my organization. I think I'm starting to get depressed because of it, blaming myself for the heat/blame others in my dept are getting, afraid that my job is jeopardy, feeling like I'm worthless, stupid and can't learn from this experience to become better at programming. Has anyone else felt this way, and how did you deal with it?
 
2:58 AM
Hard to say without more context. You do have to be pretty thick-skinned to be a programmer though.
 
I'm starting to realize that.
 
Have you fixed the bug?
 
Yes, but we're still working to clean up the effects of the bug.
 
Great. So there was a serious technical issue specific to the problem domain. And you have SURMOUNTED IT! You are a HERO! You have a PR problem, not a programming one.
 
You've also found a bug in your QA, so try to get that fixed as well.
 
3:07 AM
Damn straight! Fucking QA dept.
(Well, there's a LOT of PR in programming.)
I'm not even joking though. Your programs will always have serious bugs. Why? Because programming is fucking difficult.
 
the QA was done by me, but not thoroughly enough. I've asked someone else in my dept to help test my code before we deploy it.
But I'm also looking for ways to improve my own testing process.
 
@NathanJones Awesome. Sell that shit. You now have proof that QA is essential to the software development process.
 
testing your code is never sufficient
you design your programs around an expected workflow, and other users are important in breaking that workflow and finding bugs
 
manual testing, developer ("unit") tests, two levels of qa testing (pre-integration, post-integration), beta testing, then release. you can do it all yourself, but it is helpful to have others.
 
@NathanJones This bug has done far more good to your business than it could have possibly done harm.
 
3:13 AM
I mean testing the final product through workflow, not the code itself. I don't have any unit/integration tests.
 
also, if you aren't writing bugs, you probably aren't making progress.
 
Oh, and in case nobody told you this before, the bug isn't your fault.
 
I'm the only dev in my organization. Is the time/effort it takes to create unit tests for my code worth it?
 
Even God can't write software without bugs.
 
Or should I focus more on testing workflows and use cases.
 
3:15 AM
@NathanJones Yes.
 
@KendallFrey thanks.
 
@mintsauce Not if clients create the requirements
 
@KendallFrey Oh, yes, definitely. The tests have to be based on sound requirements, which is easier said than done. On the other hand creating a testing framework means at least you have tests in place which can be modified when the requirements change.
@NathanJones Both.
 
The easiest and most basic testing everyone should have is regression testing.
Every time you make code that does something, write a test that makes sure it does that thing correctly. Whenever you break a test, fix the bug.
 
One of the other factors that comes into play is the time given to complete a project. We're put under such deadlines that I barely have enough time after the initial, "alpha" stage to do any sort of polish, testing or feedback before having to release.
@KendallFrey I know this is vague, but most of my code is either DOM manip. w/jQuery, or AJAX calls to modify data on the backend. How do I test those sorts of things?
 
3:20 AM
A wise man once said "Complete the project on time, within budget, and meeting requirements. Choose any two."
 
I didn't pay enough attention to my Software Engineering class.
 
@NathanJones "end-to-end" tests are a great way to do integration testing on the entire path of your code.
 
they still have those?
(software engineering classes)
 
@NathanJones That's quite normal. Having a good relationship with your manager is very important. You need to educate them about software development if that is not their background, and explain the tradeoff between time/resources and quality (it's a no-brainer really). But you have to be explicit.
 
@NathanJones not sure what you've used to test before, but i've done dom manipulation tests using capybara with the webkit headless driver
 
3:25 AM
@DougLuce oddly enough, yes. I don't feel like many of my CS classes were designed for developers who would work "out in the wild". The focus was toward academia, theory, math, and programming language design. All great topics, but the curriculum sorely lacked in practical knowledge. i.e., I had never heard of version control or written unit tests until my first job.
 
pretty sure phantomjs is pretty close to that
 
@NathanJones Yeah, I think that's starting to change though. I had to do a compulsory team-working project, where the project wasn't the assessed outcome, but the nature of the team-working was.
 
i remember there were unit tests in my SE class, dunno about version control. if i were to teach a class on how to do Real World coding, i wouldn't call it "software engineering."
 
version control is pretty fundamental, no real CS or SE course should skip it
 
that may have changed since i graduated a few years ago.
I appreciate the input, everyone.
 
3:32 AM
by the time i took software engineering, vc was pretty baked into my psyche. so they mighta had it, and i didn't notice. also, it was more than 10 years ago.
@NathanJones even better: metaskills.net/mocha-phantomjs
 
4:06 AM
How far can you get without Software Engineering classes or a degree. Do you think the next generation is moving towards a "show your word" rather then "show a degree" mentality?
 
@ChristianJuth Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
*"show your code"
 
hey guys any 1 could advice on this ? pastebin.com/mYitELWC
 
@ItachiSama Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
it wont work without the alert();
 
4:31 AM
@ItachiSama the first thing I would do is reformat your if/else statements. Clean up your code a little then figure out the issue.
 
5:15 AM
I have a 20x20 grid of dom elements... some are filled with numbers and others are empty. I have a function that looks at the innerHTML of the surrounding elements when that element is clicked. If any or all of the surrounding elements are 'empty' the same function is called on each of the empty cells. Naturally if a surrounding cell does in fact contain a number then it will not call the function again.
Obviously this causes a "Maximum call stack size exceeded" range error.. How can I reset/empty the call stack each time the function is called?
 
christian.. appreciate the advice.. but i see it clean enough.. any particular advice / link i should look up regarding what your saying ?
 
> If they don't have the money to pay you, you're not an employee, you're a founder and you get the same deal that they get.
If they balk, suggest that they find another code monkey while you find another biz monkey and let the market decide who ends up with the bananas.
 
5:48 AM
quick question that really bothers me - why eval is still NOT obsolete?
 
It's still dangerous but so is any potential replacement
 
why it's part of ES6 spec still when Object.prototype.eval() is gone?
 
Didn't even know about Object#eval
 
i mean i really don't see a case where it can be used properly, other than injecting remote code
 
why is this showing me an error

if( window.navigator.platform == "Win32" ) { console.log("Hey hoss, you are running Windows Machine so I would better show you windows only version of this software"; )
 
5:50 AM
but at the same time I wonder why it's still part of the language?
 
where as if run just this: window.navigator.platform == "Win32"

It returns me a true valeue
value*
 
move semicolon outside
if( window.navigator.platform == "Win32" ) { console.log("Hey hoss, you are running Windows Machine so I would better show you windows only version of this software");}
 
oops i spotted that missing } sry ;)
 
@MaksimVi. There are a few cases where eval miiiiight work
 
np, don't write in one line
 
5:53 AM
One potential usage: sanitise an input and then use it to evaluate a math expression. Should still be faster to build than an expression parser. Not that there aren't any, but still...
 
But JS has a one big rule: DON'T BREAK THE WEB
We can't remove things that websites are depending on.
 
sanitizing is a perfect example, didn't think of that
sure we can, that's why there are obsolete methods and classes
 
jQuely uses regex+eval as a fallback for when JSON.parse is missing.
 
well jQuery makes sense, it's supposed to do that kind of stuff. I was mostly concerned why it's still there in ES6
when it's 2015 and there was JSON.parse for a long time now
 
IE8: good enough for government use. Literally.
 
5:57 AM
i think ie8 has JSON object
 
IE7: good enough for government use. Literally.
 
but it's not the point, i understand that there are older browsers. But they don't support ES6 at all while ES6 has a spec for eval()
im fine with eval being part of es5, i just couldn't see why it's still used in newer versions
 
Sometimes you just want yourself some flamethrower
 
well no, i believe it must have a purpose i just want to find out what it is
sanitizing is a good example, but is it really that common?
 
Can any look at my code :: pastie.org/10099394
 
6:04 AM
@sabbir missing end of comment
 
@JanDvorak, ok, but why status's value is changed
 
--> missing
 
im not familiar with ng, but shouldn't you be using an array of objects?
 
@MaksimVi., I also try, but no result
 
6:07 AM
and bind to info.status inside div?
can you paste the working code without your comment?
 
@sabbir *tried
 
i don't see where you print out info
@sabbir $scope.dbTbleInsert = [
{
"status":"initial"
},
{
"status":"initial"
},
{
"status":"initial"
},
{
"status":"initial"
}
];
 
Can people read this for me? Criticism plz.
 
check this out
 
@phenomnomnominal that scrollbar is dope :)
 
6:13 AM
@phenomnomnominal I don't like the flashing skull
!!define cray-cray
 
@JanDvorak cray-cray (slang) Crazy.
 
yeah i agree, i couldn't concentrate on the article because of the skull
 
@phenomnomnominal "metric of its success"
 
I'm not changing the skull :P
 
things like 'Moar' and 'Cray-cray' made me cringe a little
 
6:17 AM
@JanDvorak thanks
 
be professional, you're not on 4chan
 
@phenomnomnominal "code that drives a browser"
 
i would've mentioned cucumber and tractor in the title or somewhere in the first paragraph, because the article wasn't about the topic i expected it to be about
 
@phenomnomnominal The page makes my browser gradually slower over time. Had to close the tab.
 
@JanDvorak interesting, what browser? computer or phone?
 
6:22 AM
@phenomnomnominal Chrome, Win7, 3yo computer
 
@JanDvorak maybe because there's a 1920x1920 canvas with a skull in it, lol
 
@MaksimVi. Yeah, that could be a problem
brb doing some dom hacking
 
@MaksimVi. you'd have to be 4k to get that big and that wouldn't explain slow down, unelss it's leaking
 
My canvas was 1280x1280
was
killing it did help
 
well i don't know, may be it actually renders 1920x1920 frame on tick and then scales it down
 
6:24 AM
oh god
 
it would actually make sense
 
Yeah, I did see some hefty aliasing issues
 
because you scale it down with css
but come on man, 1920x1920? Whyyyyy?
 
Ha, oh yeah I forgot about the scaling :p
 
rip mobile users
 
6:27 AM
@phenomnomnominal too much bold
 
fucking forgot to add the max-width/height to the window resize listener
 
is there a real js debugger ?
 
yeah... it kinda freezes when I move the window from a 1280 to a 1024
... and it's kinda unclosable now
 
i reading this page and http://www.secnetix.de/olli/Python/lambda_functions.hawk

and i ran document.lastModified function in console & it return me today's date and time. Doesn't look like this page has been Modified today
?
function * property
 
@ItachiSama there's linting
 
6:30 AM
@ItachiSama like in IDE or a browser?
 
i'm using sublime text.. was hoping there's some addon for it.. or an actual debugger on browser
 
most browsers have debuggers built in
 
i.e., you can cause them to stop execution
 
isn't sublime just a text editor?
 
6:32 AM
Also is there any javascript code that can stop page( a single tab inside of browser) getting internet access once i write than in console............
 
@royhowie *e.g.
@androidplusios.design debugger;
 
yeah its a text editor
 
oh nice, it never occured to me i could just call debugger; in console
 
what debugger; @JanDvorak
can you post a link where i can see how to do that?
 
!!tell android mdn debugger
 
@androidplusios.design just type it in console
 
@JanDvorak but I meant "such that"/"that is"
 
@royhowie debuggers aren't just about breakpoints
 
@CapricaSix that i knew before. It just posses for a while. I want that once i close the debugger i shouldn't continue
pauses * posses
it * i shouln
 
@androidplusios.design bad idea
You can throw an exception in the console, though
 
6:38 AM
ohk i guess that would work thanks
 
hey guys.. please any advices on this ? pastebin.com/mYitELWC
I'm still learning..
any advice at all!
 
#1: make it clickable
 
That's a lot of padding in the declaration block
 
better use element.addEventListener(...)
 
6:40 AM
@JanDvorak overrendering should be fixed
 
@ItachiSama those declarations - do you think they might change later?
 
i'm here to learn.. if I should.. i will
 
Empty if blocks are kinda iffy but empty else blocks are just useless
 
@ItachiSama why do you care about domain?
 
^
Too much code duplication
 
6:43 AM
mmmm.. I'm using Fullpage.js addon.. and want to check if the address is www.sample.com/#home then change the value of the dn button
 
why?
 
@ItachiSama use window.location.hash instead of concatenation domain with your hashes
 
so the link of the button would change based on what the current page is Jan
i'll look it up thanks for the advice maksim
 
I also assume the alerts are just for debugging?
 
@ItachiSama use window.location.hash = about instead of window.location = domain + about
remove domain variable, you don't need it
 
6:46 AM
I have something of an opinion-based question, so I figured I'll take it to chat: I've inherited a somewhat fragile codebase of a single-page app - an editor of a sort, where you drag an element around a canvas, edit it properties, etc (cont.)
 
well.. not really.. its not really working without the alert()... i tried return false...
 
@ItachiSama umm.... what?
 
Now, there are a lot of different event handlers on each element. Several different click events handlers that are added and removed depending on edit modes, etc. It's all, as I said, very fragile.
 
let me make this a bit.. less annoying
the website im working on is www.origami-me.org
 
I was wondering if it would be better to merge the various event handlers into single handlers that check the edit mode and decide what happens, or have the different handlers keep on vying for control.
 
6:47 AM
im just adding 2 buttons up and down so people can easily navigate if they are using a tablet or phone
 
@AvnerShahar-Kashtan you could have multiple handlers, each guarded with an if
 
@JanDvorak I'm trying to reduce complexity of the whole code, which I don't know if that will do.
For instance, an element will usually have a JQuery UI Draggable and Resizable applied to it, a click-handler for laucnhing an in-line content editor, and a click-handler for updating the Properties pane on the side.
And sometimes one will swallow the other.
Especially since the inline-editing code involves unbinding and rebinding to its click event.
(So the event is disabled during editing)
 
v-v
 
@ItachiSama i would rather write it like this jsfiddle.net/ad4jdgnv/1
2
 
I should ... SERIOUSLY get the habbit of using switch.. I dont know why I never get to use it in either php or js
anyway i can vote up here ?
 
6:54 AM
you should always use switch when there are multiple conditions on one variable
 
Appreciate it Maksim
 
Pro-tip: You can't accidentally close your chrome tabs if you press your mouse pointer against the top of the screen while clicking the tab
 
more readable and maintainable that way
 
i'm a total noob.. but digging my way.. i have the passion for it
I'll start re-coding that based on your advice Maksim
 
@MaksimVi. I strongly disagree
 
6:56 AM
multiple equality conditions
 
why is addEventListener better than onclick ?
 
@ItachiSama you can attach multiple of those
 
mmm.. roger that
 
6:58 AM
after i'm done with this website.. I sure need a lot of reading and practicing... I feel so useless lol
 
@phenomnomnominal i see, if i had more than 6-7 handlers i'd use your approach
 
have you checked codewars?
 
@MaksimVi. the weird behaviour of switch statement with respect to break; means they're bad.
 
@phenomnomnominal fallthrough by default? Linters can check that
 
@phenomnomnominal you call it weird, i call it an awesome feature
 
user2620028
7:00 AM
wassup guys
 
@MaksimVi. I call it weird because it's unexpected and a source of bugs
 
@MaksimVi. ruby doesn't have fallthrough and I prefer it that way
 
codewars... no i'll now
 
@phenomnomnominal it's very expected if you know you're in a freaking switch
 
@MaksimVi. so you're telling me you've never forgotten one?
 
7:01 AM
@phenomnomnominal well it looks like your preference, there's nothing unexpected there
@phenomnomnominal never, maybe because i didn't start with ruby
@phenomnomnominal it's like calling semicolons unexpected in other c-like languages, because in java they can be omitted in most cases
*javascript
@phenomnomnominal im with you on hashtable approach though
 
No it's not, because missing semicolons, like missing breaks can cause subtle bugs
 
yeah... and fascism can cause a slightly increased adult mortality rate
 
@JanDvorak so you're saying you shouldn't use them then because they have much worse negative effects than the small one I mentioned?
 
@phenomnomnominal A missing break will cause a bug. Linting your code will catch that though
 
@JanDvorak not if it's missing on purpose
 
user2620028
7:06 AM
@phenomnomnominal No! He's saying don't use them because Pol Pot might come to your house.
 
@MaksimVi. /*falls through*/
@HatterisMad I'm not!
 
I just think there's a better alternative that isn't as potentially confusing for someone else who might have to maintain that code.
 
@phenomnomnominal Maybe, but a series of ifs isn't that alternative
 
user2620028
SORRY! I thought i was helping lol
 
a hash of functions might sometimes help
you can even build it in a distributed fashion
in Tavern on the Meta on Meta Stack Exchange Chat, 4 mins ago, by SmokeDetector
[ SmokeDetector ] Bad keyword in body, blacklisted website: How should I Use it? by karonajuriya on drupal.stackexchange.com
flag-pls
anyone?
 
7:15 AM
@JanDvorak that was what my alternative was, as shown in my fiddle
 
kinda verbose in this situation, though. Maybe with arrows
or just a plain hash string->string
 
@JanDvorak yeah string:string would be better
 
7:30 AM
@phenomnomnominal @FlorianMargaine what's the challenge ?
 
8:30 AM
@BenjaminGruenbaum did you mean to ping @JanDvorak?
 
8:42 AM
idgi, why do people upvote a question like this
 
@royhowie the accepted answer is especially terrible
 
"this question shows research effort" -> clearly the OP didn't even google the question
 
9:08 AM
I need to learn lisp.
 
9:26 AM
yes, you do
 
9:48 AM
lisp, the language of ()'s
 
@FlorianMargaine Have you ever tried cross-compiling CL?
 
@Zirak which use case do you have in mind?
 
Writing something which can be used not just on your OS
 
ah
yeah, I tried
hang on
(not possible, but lemme find you a link)
apparently it's possible to cross-compile for windows using wine
 
So you need the target architecture to compile to it
 
9:56 AM
yep
to dump a static binary for it, that is. You can still share the source code if you want
 
hi
i want to create a ui which looks like file system
there will be files and folders inside accordian and
files and folders inside any folder
and so on continues
is der any possibility to do it using angular js
 
it's same as nested lists ...
 
no they are tables
files and folders are in a table inside a accordian
 
very interesting: ReactOS, a binary-compatible-with-windows open source OS
 
10:15 AM
wow
 
@FlorianMargaine It's a great project in theory, but pretty shit in practice.
 
@Zirak yeah, seeing wine's mess gives that feeling too. Did you try reactos?
 
@FlorianMargaine For a short time. It's supposedly an open source windows, but last I checked, they were really far behind on most things
 
10:36 AM
Hey! Are you familiar with NP-complete problems?
 
10:59 AM
Hi, does anybody know any good JavaScript libraries that can nicely visualize a bunch of multidimensional vectors? When i say multidimensional, i'm talking thousands.
Been googling for ages, can't find anything decent
 
11:30 AM
@martynas there is a javascript library called dc.js for data visualization. dc.js works with crossfilter.js which is excellent library for manipulating your data. But, I'm not really sure if it takes multi-dimension; though there is something about dimensions mentioned in dc.js
 
@user514 Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
Here is the link for dc.js (dc-js.github.io/dc.js).
@poornima
@poornima are you looking for something like this fancy tree (wwwendt.de/tech/fancytree/demo/#sample-theming.html). You may want to look at other examples on the same page.
 
12:27 PM
Hello! I am working on this: jsbin.com/puruzebovu/1/edit?html,output and can't figure out how to only display only the top level data in the zoomed-out view
 
@Jhawins Yeah, why?
 
12:41 PM
My most recent attempt (broken) is this: jsbin.com/pafariqohi/1/edit?html,output where I filter out the levels below 2 during the revert, but I don't know how to get the child levels back again. As a noob, am I biting off more than I can chew with this?
 
Morning
 
afternoon
 
afternoon :)
 
weekend time = relatively silent here
 
true
 

« first day (1645 days earlier)      last day (3296 days later) »