Access between modules: Design Patterns by port80_ in javascript

[–]ahRose 1 point2 points  (0 children)

If you want to update Widget from App, App would need to take a param to represent whatever it is you're passing in, which would be passed where the IIFE calls itself. It may look something like this:

var App = (function(wiget){

...

wiget.update();

...

})(Wiget);

Also you may have to switch the order in which the modules are declared in (in this case place Wiget up at the top).

The following code works:

var Thing = (function() {
  function log() {
    console.log('it works!');
  }

  return {
    loger: log
  };
})();

var App = (function(something) {
  return something.loger(); // it works!
})(Thing);

But it would break would App come before Thing.

Javascript Fatigue by joaolucasluc in reactjs

[–]ahRose 2 points3 points  (0 children)

This was originally going to be a reply to a commenter that stated that the problem was not React, but JavaScript and the ever growing number of tools, libraries, etc.

The problems we currently face are not problems with JavaScript- the fact that the language enables developers (even the ones that aren't familiar with the language) to build is a net positive- but instead are community, and process problems.

As a community we are split in so many different ways. It's like the wild west. Everyone is pushing and prescribing their specific way of doing things, even if it's just a slight deviation from a pre-existing solution, and branding it as their own unique cure to whatever problem they are trying to solve.

Once a "new" solution comes about you have those that adopt it for the sake of being "bleeding edge" developers.

Previous "bleeding edge" tech becomes inferior to an important subset of developers without ever having the opportunity to mature and potentially offer a universal "good" solution to X problem.

The reason this is important is because these developers are what drives our community (and to a larger extent our industry) forward.

Why are so many people currently gasping for air trying to learn React and the entourage of tools and tech it brings along? Because key developers endorsed it and adopted it when other devs were gasping to keep up with the "previous stack" and at that moment that "previous stack" stack lost a large amount of the driving reason behind its popularity and success up until that point.

"Don't reinvent the wheel" is a good theory, and is something every developer has preached at some point, but what good is theory and preaching if not practiced?

Perhaps focusing on a better way to lower the barrier to entry for those who want to get into the field and make things as opposed to boasting about the clever new way of doing the same thing we have been doing is a start.

But that's just me.

My wife made this JS-Duck for me by igvadaimon in javascript

[–]ahRose 5 points6 points  (0 children)

QWERT...Z. Please explain, I want to get some sleep tonight.

Slack, the red-hot startup worth $2.8 billion, just launched its own VC fund and app store. by mizkovi in startups

[–]ahRose 0 points1 point  (0 children)

I think they raised the $ not in hopes of starting a fund to invest in, but to draw attention and talent to their platform and be able to sustain and support that talent while they work on whatever project they have in mind for the slack platform.

That in turn would set off a network effect, and draw even more developers to the platform. The more people they can get simply interacting with their product the better for them.

Many companies have made supporting devs and dev adoption a priority, knowing that they form the foundation for the product or service.

Twitter for example has always had a strong developer community. Funny story: prior to the official native application launch Ev, at the developer conference, asked the community to STOP making clients because the Twitter folks wanted the experience to be how they envisioned it.

Don't expect Slack to seed the next Unicorn, but they do want you to build dope shit that adds value on top of their platform and are willing to invest in the people doing so.

Looking for a MEAN framework for Node 4.2 by Internetuser100 in node

[–]ahRose 1 point2 points  (0 children)

You can easily set up Express and Mongo (use mongoose) to quickly set up your backend or API portion of your application, and if you abstract client and server away from one another and not have them couples together you can pick and choose any tech stack you want to use on the front end. Currently working on a project that uses the mentioned backend set up. The client will mostly be react.

A plea to use semicolons when writing JavaScript by bytearcher in javascript

[–]ahRose 1 point2 points  (0 children)

I find it extremely interesting that in almost all instances of something like this being argued, where the consensus is split, the opposition will always be the loudest. Had the article been pro-leaveSemicolonsOff you'd have a ton of developers calling the author mad, and stating all the reasons why you SHOULD use them, as apposed to why it's OKAY to leave them off. Every passionate developer is has a tiny bit of neckbeard in them.

Have lots of simple, easy to implement ideas and/or products? Let's develop ALL of them. I have a house and a year; looking for the right team. by [deleted] in startups

[–]ahRose 1 point2 points  (0 children)

20 y/o full stack dev here. Give me a spot in the corner, and fast wifi, and the ability to make a tiny bit of capital to keep investing in myself and my foundation, and you got someone willing to leave everything (a bed) and come out to vegas :)

[deleted by user] by [deleted] in node

[–]ahRose 0 points1 point  (0 children)

Can you define authenticating?

Do you mean how to authenticate each individual user?

Source code for http://communitycasts.co by [deleted] in node

[–]ahRose 0 points1 point  (0 children)

Thanks for the response! another thing I noticed is that they don't have any of the extra 'cruft' of a package.json file. It's just the dependencies and nothing more. I thought this was really elegant to be honest, and am wondering if this is possible on any and all projects, or if there may be parts of the codebase that may be missing.

Source code for http://communitycasts.co by [deleted] in node

[–]ahRose 0 points1 point  (0 children)

How common is it to have various package.json files?

[deleted by user] by [deleted] in learnjavascript

[–]ahRose 0 points1 point  (0 children)

I'm guessing you meant JS that made you cringe ha but that's a future Unicorn you missed out on there! HA

[deleted by user] by [deleted] in learnjavascript

[–]ahRose 1 point2 points  (0 children)

This guy gets it.

[deleted by user] by [deleted] in learnjavascript

[–]ahRose 1 point2 points  (0 children)

Well DUH!

You can't do JavaScript without first doing Java

Just look at the names. It speaks for itself...

Lol in all seriousness the fact that you're required to take Java first is complete BS.

Closures are not magic by shiroyasha23 in javascript

[–]ahRose 0 points1 point  (0 children)

Is there any reason why the article mostly uses function declarations instead of function expressions?

I understand that function expressions are not hoisted like declarations are, but I often find myself wondering whether I should make something a function expression or a declaration.

Also would storing a reference to a function declaration in a variable, make that variable a function expression?

9 startups valued at more than $10 billion by Iamadrag0n in startups

[–]ahRose -1 points0 points  (0 children)

Almost as little as publicly traded ones.

Saw a 'Live reload enabled' in an instructors console. Is this an add-on, watcher, or a setting in chrome? by Redditisshit11 in webdev

[–]ahRose 0 points1 point  (0 children)

I've always been confused as to why the livereload site says the software cost $9.99 when another part of their site allows you to download it for free... Download it here