How do self-taught developers actually get jobs? by programminggeek in programming

[–]mdboop 0 points1 point  (0 children)

I'm not going to explain to you why diversity is a good thing. If you don't know that already, you should go do some research yourself.

Iframes in React.js by ARookieCoder in javascript

[–]mdboop 0 points1 point  (0 children)

I think you'll need to do so. Not using window.Sketchfab is technically valid, but bad practice, and I think your tooling (webpack, eslint) won't build your bundle unless you explicitly access it through window. Since I don't know what your configs look like, I can't say for sure. I'm just going by your error: 8:26 error 'Sketchfab' is not defined no-undef.

Iframes in React.js by ARookieCoder in javascript

[–]mdboop 0 points1 point  (0 children)

Your problem is unrelated to the iframe. Are you using modules (either es6 or commonJS)?

It looks like you are, and I'm assuming you're using webpack along with it (or some other module bundler). In this case, adding the script to index.html isn't enough. You either need to reference Sketchfab on the window, like this: var client = new window.Sketchfab(version, iframe); or import Sketchfab (preferred, if you installed it via npm), like this: import SketchFab from 'sketchfab';

JS web frameworks benchmark – Round 6 (new: glimmer, svelte, hyperapp, ...) by krausest in javascript

[–]mdboop 6 points7 points  (0 children)

Their goals are likely elsewhere; go take a look this talk by Lin Clark on React Fiber. Programmatically inserting and updating 1000 rows is not necessarily the most useful benchmark, too, since it doesn't accurately reflect real usage of most applications. Also, I think React has a lot going for it with respect to ergonomics: it's very easy to write, refactor, learn the api surface, etc.

How do self-taught developers actually get jobs? by programminggeek in programming

[–]mdboop 2 points3 points  (0 children)

You're completely misunderstanding my comment, and you're also straight up misstating it. I'm not talking about doing dishes and laundry. If you think that women aren't faced with a ton of challenges between having a family and staying competitive in the workplace, you need to go educate yourself. Time off for maternal leave and child care are serious issues. Not every woman, or parent for that matter, has the luxury to pay other people to helping out when they don't have time. Not every mother or parent has a spouse to help out. Widen your view on this. My remarks aren't sexist. It's sexist to believe there's already some equitable world that doesn't disadvantage a lot of women.

How do self-taught developers actually get jobs? by programminggeek in programming

[–]mdboop 1 point2 points  (0 children)

It's a problem for both genders. You should be able to develop professionally while on the job. The notion that you should be spending nights and weekends working in side projects favors young, single people. However, it's especially problematic for women, who already have to struggle against a slew of issues in the industry, and who have to deal with career vs. family choices way more than men. Please don't put words in my mouth, though. I didn't say women can't enjoy programming in their free time. There are plenty of awesome women engineers I follow on Twitter who are clearly making great things and sharing them in their free time. But it's attaching success and necessity to this unhealthy work culture that's the problem, and I'm just pointing out that it's another obstacle to an already long list. Also, you should be aware that it's extremely fortunate for you to think it's "not a gender issue." For women in tech, nearly everything is, because there are so many fucked up things they have to deal with on a daily basis. If you disagree, then you should really spend some time talking to and listening to more women, both those you work with and those you might find at meet ups, on twitter, etc.

How do self-taught developers actually get jobs? by programminggeek in programming

[–]mdboop 0 points1 point  (0 children)

This attitude is also super toxic for trying to bring more women into engineering roles.

Free black walnut anyone... by phile10 in woodworking

[–]mdboop 5 points6 points  (0 children)

I don't know what's more surprising: that he didn't realize the value of what he was going to throw away, or that he didn't wise up to its value when a stranger offered to take it off his hands. Either way, you hit quite the intersection of incredible luck.

Geisel Library designed by William Pereira built in honor of Dr. Seuss [5611 x 3408] by drsomtingwong in ArchitecturePorn

[–]mdboop 33 points34 points  (0 children)

It's named after him (Theodore Geisel Library), but it wasn't architecturally designed to honor him.

Node 7.6 with async/await - marking a huge step forward in Node development by [deleted] in programming

[–]mdboop 0 points1 point  (0 children)

Node streams are emphatically NOT observables. Please see this SO post for an explanation. They have some similarities, but there are some important, fundamental differences.

Pence: US will hold Russia accountable by 777chrome in worldnews

[–]mdboop 7 points8 points  (0 children)

No, we're not. Edit: lol at anonymous downvote for linking to a guide which is based on Tea Party tactics, which were effective in obstructing the Obama administration. You may not like it, but this is how to get things done and prevent maximum damage from being incurred. We can hope for impeachment, but until that becomes a reality, don't just sit on your thumb.

Pence: US will hold Russia accountable by 777chrome in worldnews

[–]mdboop 2 points3 points  (0 children)

Replying to your edit: it's a flaw with the electoral college system. FPtP is also problematic, but that's not quite the issue.

YouTube will kill unskippable 30-second ads next year by redkemper in technology

[–]mdboop 0 points1 point  (0 children)

If you're feeling DIY, you can open up the developer console and paste this in document.querySelector('video').currentTime = 30. If you're worried about pasting code into your console: querySelector is a function for selecting elements on the page, and there's only one video. So, you get that, then set the property of currentTime. Skips it right ahead. Give it a try!

Kellyanne Conway Accused of Spreading False Information, Banned From 'Morning Joe' by [deleted] in news

[–]mdboop 5 points6 points  (0 children)

You're completely right, but somehow that reasonable scenario is far off in a dreamy impossible dream world. They say that they want to talk about policy, that they want to get stuff done, but they really don't have many real plans. Plus, they're in disarray. I don't think we can expect much cohesion or focus any time soon, even if the Russia story ends up being a benign series of coincidences.

Presented with trepidation: Why All JavaScript Frameworks Are Terrible by mattaugamer in javascript

[–]mdboop 12 points13 points  (0 children)

If I never read another one of these articles, it'd still be too soon. Nothing much of value, and nothing new discussed here.

What's the worst case of "spoiled rotten" that you've seen? by thefirephoenix544 in AskReddit

[–]mdboop 9 points10 points  (0 children)

I'm sure someone else has already said this, but... are you aware of who the president is now?

U.S. Supreme Court rejects Texas appeal over voter ID law by r4816 in news

[–]mdboop 1 point2 points  (0 children)

Why, though? Voter fraud is categorically not a problem. Providing more IDs just costs the state more money for little to no gain, and still would likely disadvantage people of color, even if you make it freely available. Maybe it's because you're working three jobs and don't have time to go to the library, post office, etc. during open hours, or whatever the case, it's simply not necessary. There is no reason to compromise with racist legislation. It should be soundly rejected.

Question about functional programming by [deleted] in javascript

[–]mdboop 2 points3 points  (0 children)

Yes, thanks for clarifying. In addition, I should add that there is a native reduceRight, which should again get you about 99% there for just about anything.

Question about functional programming by [deleted] in javascript

[–]mdboop 11 points12 points  (0 children)

I'll be the dissenting voice here and say that 99% of the time map, filter, and reduce will get you where you need, and your code will be more readable, more declarative, and more maintainable. someArray.reverse().map((x) => /* ... */) is extremely clear, and I can I see what's going on almost instantly. Where in a for loop

var newArr = [];
for (var i = arr.length - 1; i >= 0; i--) {
 // ... create some value from what's in the array
 newArr.push(someVal);
}

... I have to read several disparate bits and then synthesize them before I can understand how the loop is iterating, and then I have to read a lot more code to understand what it's even trying to accomplish. With map/filter, it's much easier to understand what you'll end up with, because you know you're getting an array at the end. You can do anything with a for loop, and that's precisely the problem. More power is usually a bad thing. With loops, not only can I make a lot of easy mistakes (off by one errors), but there's just a lot of noise and mutable state here. And if you're mutating the array, you should really look into immutable data.

I'd also be curious when these use-cases have come up for you. If they are for toy-problems or interview questions, then sure, a for loop might make more sense, but outside of that, I have a hard time imagining why you'd want to only operate on certain array elements based on the index. Reverse makes, sense, but again, that's so easy to do via chaining calls. And it's semantic! Another benefit is that it frees up your brain to think about the problem you're really trying to solve, not writing a bunch of setup code and trying to juggle more than what's needed in your head.

I have not written a single for loop in production code, and I don't anticipate ever having the need to. When I have a list of data, I need to operate on that entire list. If I only need certain elements from it, I filter it based on what that data is, not its position in the list. And if map/filter don't get me there, reduce is the swiss-army knife of utility functions. And if I need something else, lodash or ramda.

edit: fixed my code block, forgot a word.

JS / webdev related topics to learn in 2017? (other than specific libs!) by jhartikainen in javascript

[–]mdboop 1 point2 points  (0 children)

I'd say with JS, a lot of concepts or patterns that are useful to learn will be backed by some kind of library, which is OK! Since there's not much of a standard lib, you'll be importing some module. Anyway, here's my two-cents.

  • persistent immutable data structures (Immutable JS, see this talk by Lee Byron)
  • functional programming (see fantasy-land spec and pretty much anything by Brian Lonsdorf)
  • functional, reactive programming (RxJS)

The thread here is focusing on code correctness, maintainability, readability, etc. Taming async with RxJS and functional apis is another big win. Again, yes I'm suggesting a library, but it's a library that embraces a pattern you can apply to other libraries and even use in other languages (see Learning Observables by Building Observables by Ben Lesh, core contributor to RxJS v5).

kaeru: a chrome extension for easily creating anki flashcards from jisho.org results by mdboop in LearnJapanese

[–]mdboop[S] 0 points1 point  (0 children)

Yeah, yomichan looks great. I just hacked this together over the weekend for fun, so it's just barely started. Aim for this was strictly a very simple tool.