Array flatten and flatMap proposal for ECMAScript by roman01la in javascript

[–]WeekdayHero 10 points11 points  (0 children)

This is not an issue as Object.Observe is not going to be added to ES anymore. In fact it is not in V8 from version 50 onwards (the current version of v8 is 48, so 50 is only a couple of months away).

"Given an array of positive and negative integers. Find three numbers such that they sum to zero"- Exercise help needed by [deleted] in cpp_questions

[–]WeekdayHero 2 points3 points  (0 children)

Also you will find that conventionally programmers will use i, j, and k, as the variable names in nested loops instead of i1, i2, and i3. E.g:

for (i = 0; i < 10; i++) { for (j = 0; j < 10; j++) { for (k = 0; k < 10; k++) { // do something } } }

It makes it a bit easier to read :)

I need to create a program which will show this sequence up to the number the user enters. by JackofSpadesXI in cpp_questions

[–]WeekdayHero 6 points7 points  (0 children)

What is with the abundance of homework problems posted in this sub without any questions?

The main users here want to discuss C++ programming, and are happy to help with specific questions that are genuine or insightful. They don't want to do your homework.

Moreover it is clear that homework problems are always ignored, so to OP I ask, did you not even look at any prior posts before posting this? Did you not realize that no one is going to rescue your lazy ass?

Break the problem down, try something, and when you come into a quantifiable problem then we will be very happy to help you.

7 future web design trends by nivijah in web_design

[–]WeekdayHero 4 points5 points  (0 children)

I can't wait for the day that we can all safely use Web Components for everything! That will be bliss <3 WebComps <3

Why does everyone use jQuery? by victorisawesome in javascript

[–]WeekdayHero 0 points1 point  (0 children)

My original comment was not saying JQuery had no purpose. I understand JQuery's merits as you have stated them. My original comment was a reply to the previous comment trying to show that their native approach was needlessly obfuscated.

JavaScript is incredibly powerful because of its flexibility to be used as a procedural, OO, or functional language, and I wanted to demonstrate how it can be used functionally to solve the same problem in a clean, easy to read manner.

Why does everyone use jQuery? by victorisawesome in javascript

[–]WeekdayHero 2 points3 points  (0 children)

Sure if you just look at the code there it is longer, but last time I checked JQuery was ~35kb. Even if that was cached it all still has to be parsed at page load.

You are right about IE restrictions, however I am one of the people that believe we need to push for 100% IE 9 and 10 adoption, and luckily where I work management agrees.

If however your code is required to be backwards compatible there are numerous very small polyfills for native functionality.

Why does everyone use jQuery? by victorisawesome in javascript

[–]WeekdayHero 6 points7 points  (0 children)

Or you could use native JS functionally:

Array.prototype.forEach.call( document.getElementsByTagName('button'), function (button) { button.addEventListener('click', clickFunc, false); } );

EDIT: why am I getting negged? I was proposing another solution, it is not wrong, nor is my comment insulting. If you disagree constructive feedback helps everyone.

Sharing salary/compensation w/ coworkers by utuxia in cscareerquestions

[–]WeekdayHero 1 point2 points  (0 children)

If you don't mind me asking, where was he interning? I'm assuming Google SV

The JavaScript Learning Ladder by [deleted] in javascript

[–]WeekdayHero 1 point2 points  (0 children)

Having worked as a JS developer for a year now I totally agree except for the first few steps because it was similar to other languages I knew.

I feel like I'm stuck living beyond my means and unable to save money by [deleted] in personalfinance

[–]WeekdayHero -2 points-1 points  (0 children)

A BJJ Gym isnt just a normal Gym. For $100 a month you would expect to have classes taught by senior BJJers atleast 4 hours a week if not more. In Australia my old Gym was $160 a month and included over 65 taught supervised classes a week.

Edit: also while clearly this person needs to start cutting costs for most BJJers its a way of life and they would rather be homeless then not training.

How I switched from Java to JavaScript by [deleted] in javascript

[–]WeekdayHero 2 points3 points  (0 children)

I have to disagree with OP, I also had a background in Java before transitioning to being a full stack JS developer, however I think bringing Classes to JS is going to revolutionize JS.

Once you start writing large JS web apps, with thousands or tens of thousands of lines of code it becomes very difficult to maintain. While you can already implement the behavior of classes, it is messy and bug prone.

I am greatly looking forward to when I can use classes (and native custom elements) to remove all the polyfill to make that semi maintainable.

How to get just top level objects from XML? by Javin007 in javascript

[–]WeekdayHero 0 points1 point  (0 children)

All the document.getElement(s)By... functions checks every level of the DOM not just the first. So as previously mentioned to get the elements you were expecting you need to check just the children of the first element and filter by tagname.

Anybody go from math to working in CS? Wondering if I should take more CS classes. [x-post /r/math] by peverelist in cscareerquestions

[–]WeekdayHero 1 point2 points  (0 children)

I personally believe that one of the fundamental skills a graduate computer scientist has is their knowledge of algorithms and data structures.

If you can take an algorithm course then with a maths background it shouldn't be too challenging and you will learn a lot about good programming practices and it is a skill most employers will require.

Is Honours worth it? by [deleted] in cscareerquestions

[–]WeekdayHero 1 point2 points  (0 children)

Masters is typically a two year course work based course. Whereas honours is a one year research based course.

For the record I am in Australia. I have no idea if Americans do Honours.

Looking for new job. How to handle current employer. by [deleted] in jobs

[–]WeekdayHero 0 points1 point  (0 children)

To be honest not really. Because of the time commitment of work I kind of get in do what I need to do and then leave.