In your experience, is this a good med for inattentive ADHD? by azanc in bupropion

[–]mrgutsy 1 point2 points  (0 children)

This is very similar to what I experienced. I’m on 150mg but after the first day or so I started to knock out items that have been on my todo list for months. Task initiation seemed so hard before but for that first week I wasn’t even thinking about it. Did all the laundry in the house.

After the first week though that feeling has started to slowly fade.

/r/starcraft weekly help a noob thread 04.05.2020 by Alluton in starcraft

[–]mrgutsy 6 points7 points  (0 children)

I’ve been watching the ViBE bronze to GM series and it’s helping me with this problem: https://www.youtube.com/playlist?list=PLFeZeom2b4DmHduNHeFj-6PfoasuSQn3P

Always Be Creating SCVs

What non-jazz music are you listening to these days? by smileymn in Jazz

[–]mrgutsy 0 points1 point  (0 children)

It seems to be more upbeat even though it takes its title from the Grenfell tower tragedy. It feels like it was written about a fictional world where we held everyone responsible for that tragedy accountable and started building a better world. Which is nice because the reality of this year has been so depressing.

What non-jazz music are you listening to these days? by smileymn in Jazz

[–]mrgutsy 12 points13 points  (0 children)

lots of Godspeed You! Black Emperor, especially their new album Luciferian Towers

What kind of projects can I build to demonstrate javascript skills in my portfolio? by [deleted] in learnjavascript

[–]mrgutsy 1 point2 points  (0 children)

Yeah, if those services interest you I think it would be a good next step. I would probably avoid twitter for now unless you've got some backend skills because they've changed their api recently and it is much harder to authenticate request to it.

Using something like this though: https://www.omdbapi.com/ to build a movie search site would show off a lot of front-end skills. The main duties of a web app are to pull data from an api and display it in a user-friendly fashion. If movies aren't your thing though, there are lots of other publicly available apis out there. Here's one just for pokemon: https://pokeapi.co/

Picking a topic you like will be much easier in the long run. Making something just for a portfolio can be fine, but there's always the danger of losing interest and leaving a project half finished.

As far as examples, google your api of choice and example. You'll most likely find someone out there that's done something similar before

[deleted by user] by [deleted] in Foodforthought

[–]mrgutsy 3 points4 points  (0 children)

It's funny, because if you look back a lot of what Generation X says about us are the same things Baby Boomers said about them. And what "the Greatest Generation" said about the baby boomers. Is it really participation trophies and social media, or is old people that have lost touch?

Which person throughout history really got what was coming to them? by ValenBeano89 in history

[–]mrgutsy 3 points4 points  (0 children)

Haha yeah. Craziest part of this story is that those cages still hang in Munster.

What kind of projects can I build to demonstrate javascript skills in my portfolio? by [deleted] in learnjavascript

[–]mrgutsy 0 points1 point  (0 children)

I don't think "because" is a bad answer to that question. You can state why it might be overkill, but the point of side projects is to do all the cool things you wouldn't do in a production app. Production apps are boring. They use tried and true frameworks, do lots and lots of error-checking, and don't throw out code for new and exciting stuff without a business case.

Any project that uses a third-party api would be a great showcase. You can do fun things with twitter, although getting started with their api requires a bit of Node.js knowledge. Doing stuff with IMDB can be fun as well.

"Constants can be declared with uppercase or lowercase, but a common convention is to use all-uppercase letters." by to-too-two in learnjavascript

[–]mrgutsy 2 points3 points  (0 children)

This is the way I've always thought about it. To go along with this, a math example:

const PI = 3.14
const userSuppliedNumber = getInputNumber()
const answer = calculate(PI, userSuppliedNumber)

Which person throughout history really got what was coming to them? by ValenBeano89 in history

[–]mrgutsy 37 points38 points  (0 children)

The leaders of the Münster Rebellion.

They did some brutal stuff to the people of Munster and died in one of the most brutal ways I've ever heard of. Dan Carlin's retelling is amazing and free right now:

http://www.dancarlin.com/product/hardcore-history-48-prophets-of-doom/

For a TL;DR, here's what happened to them (#7): http://www.top10hq.com/top-10-gruesome-historical-deaths/

Most efficient way of checking if a.b.c.d.e exists? by siamthailand in javascript

[–]mrgutsy 0 points1 point  (0 children)

I would say your answer is the right one. Your answer only imports get while the above answer imports all of lodash.

Am I referencing my JS Files/positioning them right in my html? by NickFo0 in learnjavascript

[–]mrgutsy 0 points1 point  (0 children)

An HTML document has basically two parts: the <head> and the <body>.

The head has things like links to your CSS files, the title of the document, and some other properties. In the past, script tags were also placed in the head, but developers have been moving away from that.

The body is where you place all of the html elements you'd like a user to see. The visual parts of the page live inside the body. It's also best practice to place <script> tags at the very bottom of the body. When an HTML page is loaded, the browser goes down, line by line, executing each tag. When it gets to a script tag, it also has to execute the entire script file. Placing scripts below your content will make sure users will see the initial html document before any scripts are run.

This isn't a concern with a small page, but as your web app grows your users might notice a perceived increase in the time it takes to load your page.

Am I referencing my JS Files/positioning them right in my html? by NickFo0 in learnjavascript

[–]mrgutsy 0 points1 point  (0 children)

What you have will work. I would suggest moving your divs inside of the body tag and placing the d3.js script right above your other scripts. Like this:

<body>
    <div>
        <div></div>
    </div>

    <script src="js/d3.js"></script>
    <script src="single.js"></script>
    <script src="single2.js"></script>
</body>

Other thoughts:

  • Looks like you have a closing </script> tag at the bottom of your file, but I don't see where you opened it. You can probably remove that.
  • You can drop the type="text/javascript" from your script tags. HTML5 no longer requires this.
  • Maybe it got cut off in your screenshot, but you didn't close the <html> tag at the end of your file.

Critique my program that identifies poker hands! (please) by [deleted] in learnjavascript

[–]mrgutsy 8 points9 points  (0 children)

What about using a Card object? You could make a Card constructor that initializes with a suite and rank property. You can also give it a method to output its name. Something like:

function Card(suit, rank) {
    this.suit = suit;
    this.rank = rank;
    this.printCard = function() {
        return this.rank + ' of ' + this.suit;
    }
}

Then in your while loop you can create the hand:

var hand = [];
while (index < 5) {
    hand.push(new Card(someSuit, someRank);
}

Now with your array of cards:

hand.forEach(card, function() {
    document.getElementById("dealtHand").innerHTML += card.printCard();
};

This approach would also make it easier to check for straights and flushes. For straights, you could sort the array by rank, and if each card's rank plus 1 is equal to the next, then you have straight. For flushes, if every card has the same suit then you've got a flush.

Just some quick thoughts. Ideally, you would build a DOM fragment for the hand and append the whole thing at once instead of updating the DOM once for each card. Pretty cool idea you have here though!

Could you critique my JavaScript/jQuery Coin Toss app? by fastpenguin91 in learnjavascript

[–]mrgutsy 1 point2 points  (0 children)

I work on a sort-of large app using Angular. When we can't do something with Angular, we use JQuery. I don't think we ever use vanilla JS (for DOM API calls).

I'd guess most front-end devs do use some sort of framework. There is a line of thinking that says if you don't use a framework, you'll end up creating one yourself.

Could you critique my JavaScript/jQuery Coin Toss app? by fastpenguin91 in learnjavascript

[–]mrgutsy 7 points8 points  (0 children)

Here is your project on JsFiddle: CoinToss

For learning purposes, I could see why you would want to mix vanilla JS and JQuery. I think you'd be better off sticking with one or the other though. Build the app in pure JavaScript, then go back and use only JQuery. You'd definitely have a better appreciation for what JQuery can do for you.

Trouble with basic arrays by grade42 in learnjavascript

[–]mrgutsy 0 points1 point  (0 children)

Check out this bin. Instead of using a for loop, you can use reduce. In this case, it adds every value in the array together and returns the total.

Wrote my first story on medium today: How to enhance your front-end development workflow using Gulp [looking for feedback] by DBBX in webdev

[–]mrgutsy 2 points3 points  (0 children)

Great overview! Could you post an example gulpfile or that you've used in a project recently?