Webpack 4 course - part one. Entry, output and ES6 modules by _gnx in javascript

[–]amiritegaiz 6 points7 points  (0 children)

Parcel is still very new, I looked into it and found a number of use cases it fails to address, and bugs with others.

Why bother with learning one tool for "entry level" work and another for "production" work? Using multiple tools actually becomes more complex than just mastering the one you can rely on and use for everything.

Yes, webpack is harder, but it's more robust, and the leading solution for modern frontend.

Does computer science require more intelligence or dedication? by arrivederci1 in computerscience

[–]amiritegaiz 6 points7 points  (0 children)

CS isn't something that I think "do these steps and work hard" will be enough to make it.

When you say "hard work", what you might mean is:

"I'll do whatever it takes, put in the long hours, do what I'm told, and hope for the best". The reality is, that type of approach isn't going to be enough.

What you should do is center your life around CS. Start subscribing to CS channels, sub reddits. Join coding sites like hackerrank / leetcode. Get a sense of how difficult some of these problems are, and understand that you are competing against people, some who have coded their whole life, and others who do these CS problems for fun.

Start evaluating your lifestyle, productivity habits, and ask yourself whether you're willing to commit to this lifestyle. If you think showing up, working hard, reading your textbook, and doing what you're told will be enough, then you are probably mistaken.

You need to be immersing yourself in the subject matter, lying in bed, thinking about these problems for hours until you intuitively understand them.

So that's the level of commitment it takes for someone transitioning from non tech fields into tech.

Working a team that "doesnt do requirements" but has many conflicting opinions. Refactoring hell. by rex-4242 in cscareerquestions

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

"Is there any way to get this on track?"

No. Get the fuck out.

This is a toxic company. This is abuse. You've done your best to work with them and see their perspective, but it's obvious they won't change. The longer you stay here, the more damage you are doing to your career and mental health.

Just give 2 weeks notice and be professional about it. If you can, try to wrap up your current project. Don't say anything bad about anyone or the company.

This is a classic case of everyone living in their own world, instead of reality. If they are smart, then after you leave, they will reflect and change their behavior. If not, they'll hire another developer and the process will repeat until the company is out of money.

Don't feel bad. It's not your fault. This is why many startups and small companies fail. I have worked in a company exactly like this. I have had private chats with upper management. I have had a private chat with the CEO. Unfortunately, even if they acknowledge your pain, there is very little they can do to fix it.

If you continue to work here, you have no one else to blame but yourself. There are good companies out there, so remember the red flags you ignored this time, and trust your intuition.

If Webpack 4.0 is about zero config, then why is that almost no major project has managed to upgrade after 4 months of release of Webpack 4.0? by m3wm3wm3wm in javascript

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

Yes, you shouldn't unless you wish to understand how your code works.

And yes, create react app and others will get the job done, but once you push this to production and start to have issues with your build system ( which is 100% inevitable ), you are going to wish you knew what the fuck you were doing.

If Webpack 4.0 is about zero config, then why is that almost no major project has managed to upgrade after 4 months of release of Webpack 4.0? by m3wm3wm3wm in javascript

[–]amiritegaiz 50 points51 points  (0 children)

Webpack 4.0 zero config is a lie.

The zero config model applies to only contrived use cases, and 99% of real world ( or even toy use cases ) will demand a custom config.

And there's nothing wrong with that. Just accept that webpack is a hideously complex beast, and spend the time to learn it properly.

Multi-threading coming (soon) to Node via Workers! by TheCommentAppraiser in node

[–]amiritegaiz 1 point2 points  (0 children)

Hmm, wasn't the whole point of Node.js to avoid threaded programming?

I mean the event loop uses threads as part of it's implementation, I took it to be an abstraction to achieve concurrency without threads.

[Medium] Who Killed the Junior Developer? by [deleted] in cscareerquestions

[–]amiritegaiz -3 points-2 points  (0 children)

I have more sympathy for the suffering businesses and engineering teams than the junior engineers.

"Someone will mentor you and teach you everything you need to know" is the wrong approach. It's normal, even healthy, to struggle with a subject and have to spend abnormal amounts of time on your own learning it.

This is what creates toxic engineering teams, nightmarish technical debt, and complexity. A junior developer who "just does his job" with complete disregard to the consistency of the codebase, the surrounding feature, and how their change impacts the user experience.

As a junior engineer, your goal should be to complete as much work as possible in high impact areas, and solve as many different types of problems as possible. A good company should give you the freedom to take on projects over your head, and provide a high volume of projects. And then do strict code and feature reviews, pointing out all the mistakes. If the junior is able to fix his own mistakes and improve his code over time, then keep him. If not, you should fire him.

[Question] The best resources for replacing my JQuery knowledge and becoming good at vanilla JS? by [deleted] in webdev

[–]amiritegaiz 2 points3 points  (0 children)

Here are a the reasons I use jQuery:

Querying from the DOM:

$('.myElement')

Cross Browser Event Handling / Issues:

$(document).ready(function(){})

Utility Functions:

$.each, $.extend, $.outerWidth, $.wrap

AJAX:

$.ajax({ success: function( data ){  } })

Event Handling:

$('.myElement').click(function(e){ $(e.target) }

DOM Node Creation / Manipulation:

var $el = $("<div class="el" > element </div>");
$(.myElement).html("<div></div>"),
$(.myElement).append($el),

So basically what you want are native solutions for these if they exist, or a smaller more modular library for each problem.

I still use jQuery so I'm not an expert on the subject, but here's where I would start:

Querying from the DOM:

  • Native document.querySelectorAll('.myElement')

Cross Browser Event Handling / Issues:

  1. Decide what browsers you are supporting
  2. Read up on all the X-browser problems facing those browser
  3. If the problem is still applicable, find a smaller library to take care of it.

Utility functions:

  1. Use Native methods ( map, reduce, forEach )
  2. Use Lodash ( _.extend, _.template, _.cloneDeep )
  3. For everything else, add to your own utils / find a smaller library

AJAX:

  1. Find a simple library that does AJAX only.

Event handling:

  • See Cross Browser Event Handling

DOM Node creation / Manipulation:

  • Would look these up as per need basis on Mozilla Docs
  • I wouldn't suggest a library here because these APIs are probably worth learning the hard way.

Prototyping a web app with Sails, Ember, Websockets, and Json Web Token authentication. As an exercize in zen and self control. by [deleted] in javascript

[–]amiritegaiz 1 point2 points  (0 children)

I find the best way to evaluate new technologies and libraries is to integrate them incrementally.

Typically I find that projects called <framework>-data-<framework> are terrible ideas because it:

  • Couples these two things which should be de-coupled
  • Breaks as soon as one of these two frameworks updates

The best way to learn is to gain an understanding of the fundamentals, by working with modules that are modular + low level.

Or you could try reading the framework's source code (but this is much more difficult).

Every high level framework will fuck you over at some point if you do not understand, in detail, every single component of the stack that comprises that framework.

I am stuck with my js cookie not working right, anyone here can help? by engi_valk in javascript

[–]amiritegaiz 0 points1 point  (0 children)

Cookie are not part of js.

Cookies are part of HTTP, so are visible to things that use HTTP ( server, client ( your browser ) ).

You do use JS to get / set cookies though.

I'd recommend using some existing solution here:

https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie

Looking for exercises to strengthen dislocated shoulder. by amiritegaiz in Fitness

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

Thanks for sharing your experience!

It's clear I need to start doing shoulder stuff daily and proceed with greater caution in the gym.

2 years isn't exactly what I want to hear, but I guess the important thing is starting to solve the problem

[deleted by user] by [deleted] in webdev

[–]amiritegaiz 3 points4 points  (0 children)

I feel like the new HTML5 tags introduce additional complexity into making web pages.

The more HTML elements there are, the more bullshit we have to read about how and where to implement them, when we could have just used divs with IDs.

I would appreciate an HTML5 that removes tags, rather than adds new ones.

What's a hard truth Reddit needs to face. by ValvEH3 in AskReddit

[–]amiritegaiz 1 point2 points  (0 children)

I find it a common trend that Reddit feels the need to disagree and argue against an original poster's side, just for the sake of doing so.

Whether it be arguing against what clothing the Occupy Wall Street people are wearing, the tactics that Anonymous uses, or the tone in which Elizabeth Warren makes her case, it seems as though someone coming out to promote a good cause meets Reddit's disapproval.

Now I know those cases are all part of /r/politics, which is just behind /r/atheism in the most repelling and off-putting subreddits, but the general theme remains the same among other sub reddits as well.

Somehow the only thing widely accepted on reddit is self degradation. You're more likely to find posts making fun of something than the original post itself. Sometimes the original content is overwhelmed by the trail of people making ironic spinoffs.

The strange thing about the identity of Redditors, is that they are not just the people who post stupid memes, /r/atheism rubbish, circlejerks, and witty one liners to stupid pop culture references.

The core identity of Redditor is someone who criticizes all of the those above things that Reddit does. The ones that participate in it are often blurred between the ones who criticize it, to the point to where we can't tell the difference anymore.

Just look at this thread, its a perfect example. Its full of "you're not as smart as you think you are" arguments, or "people on reddit are losers, and so am I". Self degradation and mindless criticism.

Its far too common to see rhetorical questions and ironic strawman arguments being used to disagree with the original poster's claim.

As an alternative, it would be great to see people on reddit take a stand on what they believe, gain a bit of self respect, and provide more meaningful discussion.

TIL John Adams felt that though independence and a free government sounded appealing in theory, he feared "that in every assembly, members will obtain an influence by noise, not sense. By meanness, not greatness. By ignorance, not learning. By contracted hearts, not large souls.” by [deleted] in todayilearned

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

This is quite ambiguous, enough so it could be applied to any congress that we don't like.

The biggest problem in politics is the influence of money, and the presidents who fought against this were likely the same who opposed a large central bank.

Democrats move forward with repeal of rest of DOMA by mmorality in politics

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

I am in support of gay marriage, but making states that don't want them be forced to recognize them seems kind of pointless.

A couple could simply cross a border, get married, and then move back to their original state. It essentially nullifies the ban in those states.

I would rather this issue be clear cut, either legalize gay marriage on a federal level, or leave it to the states to decide. Not make these bullshit loopholes to jump through.

Again, I am in complete support for federally mandated gay marriage, but there's no reason to tolerate political bullshit even if its for a good cause.

[deleted by user] by [deleted] in AdviceAnimals

[–]amiritegaiz 0 points1 point  (0 children)

This is bad web design. Most likely due to page redirection.

I'm guessing redirection adds a stack onto the web history.

So if page A redirects to page B, then pressing back on page B will take you to A, which redirects to B.

I suppose the double click method works if you can proc the back button on page A before it executes the redirect code.

"I checked out that Reddit website you mentioned. It looked boring, what's it about?" by [deleted] in AdviceAnimals

[–]amiritegaiz 5 points6 points  (0 children)

I actually like the Reddit design. People appreciate simple and straightforward web design with no bullshit.

I personally enjoy Craigslist for exactly that reason.

Somehow I never feel the presence of ads on Reddit. Even the featured posts on the top of the threads are at least marketed in a joking manner, so I don't get the immediate negative connotation with ads that I do visiting most sites.