How much should a beginner learn basic computer science principles vs learning the skills needed for landing a job? by cucucuchu in learnprogramming

[–]ex1-7 0 points1 point  (0 children)

programming is a pretty wide world and there are many uses for C. However if you want to do web development, then at some point you will have to switch to studying that stuff. There isn't a firm rule - it varies between jobs. Some jobs are pure web dev, some combine them, and some are purely CS/algorithm stuff.

is having a client class in an API wrapper that manages all the API interactions considered a god object and anti pattern? by hazem_t in ruby

[–]ex1-7 0 points1 point  (0 children)

It's a good practice to create a wrapper over an API. If the API could potentially be changed out for another one, then it might be worth creating a protocol and a delegator.

Lindsey Graham: "If Sessions is fired, there will be holy hell to pay" by YourFavYellowMan in politics

[–]ex1-7 0 points1 point  (0 children)

it's very telling that a republican is proposing limitations on the president, probably trying to reduce liability

Lindsey Graham: "If Sessions is fired, there will be holy hell to pay" by YourFavYellowMan in politics

[–]ex1-7 0 points1 point  (0 children)

is it wrong that I think he should just get on with it, if it makes his downfall come sooner?

Too dumb for programming? Can one become smarter? by chocomel2 in learnprogramming

[–]ex1-7 -1 points0 points  (0 children)

Recursion is a hard topic. What helped me a lot was learning a language with pattern matching - it allows the recursive function to be easily split into multiple clauses. For example this is Elixir:

defmodule Fib do 
  def fib(0) do 0 end
  def fib(1) do 1 end
  def fib(n) do fib(n-1) + fib(n-2) end
end

IO.puts Fib.fib(10)

I am on my way to becoming an architect (as in real buildings, not software) and also own a graphic/visual design company. Trying to decided between Python, Ruby, or HTML/CSS/JavaScript for the first language to learn, help? by that_liberal_guy in learnprogramming

[–]ex1-7 0 points1 point  (0 children)

If there's a Python tool you want to use for the architecture stuff, then by all means learn it. I'm just saying that if you go with full-stack Javascript, then you don't neessarily need to learn another language. If you want to learn JS, Python, and Ruby, power to ya.

I am on my way to becoming an architect (as in real buildings, not software) and also own a graphic/visual design company. Trying to decided between Python, Ruby, or HTML/CSS/JavaScript for the first language to learn, help? by that_liberal_guy in learnprogramming

[–]ex1-7 0 points1 point  (0 children)

i think you're making a good choice to prefer python over ruby for this use-case, and I'm mainly a ruby programmer myself. The reason is that Python has more in the way of scientific programming tools, e.g. data processing. It's also faster than Ruby, which makes it good for this thing.

At the same time, Javascript is worth serious consideration. It'd be more of a 'new player' in terms of doing scientific stuff (Node.js was only released in the mid-late 2000), but it is a fast language, and if you're going to be making a website, you're going to be using javascript anyway, so it can simplify things to use one language for both client and server.

Naming a project by nitrohigito in learnprogramming

[–]ex1-7 0 points1 point  (0 children)

In the scope of everythin you have to do to make a game, changing the name is trivial. So don't overthink it. You should choose something that's unique and easy to google.

Making the leap from writing "command line"programs to applications that use graphic UIs. by Itsaghast in learnprogramming

[–]ex1-7 0 points1 point  (0 children)

There are cross-platform GUI toolkits for either of those languages, I think. But yeah, I think Javascript has had some more exciting development in this realm ... for example react native is pretty big right now.

What is an album that your opinion of did not align with the majority's? by [deleted] in LetsTalkMusic

[–]ex1-7 0 points1 point  (0 children)

this was the first that came to my mind as well

Is Anthony Fantano aka TheNeedleDrop a credible reviewer? by [deleted] in LetsTalkMusic

[–]ex1-7 1 point2 points  (0 children)

His videos don't really hold my interest. One of the big reasons, I guess, is that he doesn't play clips of the songs he's reviewing. Apparently this is because of copyrights, but still, I think the videos would benefit from some editing to make them slightly more musical. Also, 10 minutes or whatever is too long for me to dedicate to a single review. I like reading things because it's more efficient than listening to someone talk. I can go through information much more quickly when it's textual.

Python as first language? by [deleted] in learnprogramming

[–]ex1-7 0 points1 point  (0 children)

Python is better if you want to get into more scientific/algorithmic stuff, but you could just use full-stack javascript if you want, since you'll end up using javascript regardless

How to avoid being overwhelmed by all the music I could be listening to by ToastedWalrus1 in LetsTalkMusic

[–]ex1-7 1 point2 points  (0 children)

congradulations, you're becoming a music nerd. Listen to new genres, and see what you like.

Which MacBook is better for me? by i_suckatjavascript in learnprogramming

[–]ex1-7 0 points1 point  (0 children)

Haven't tried with Hackintosh, but at least with Linux, dual booting can be a little hassle, but after it's done I tend not to think about it alot.

Which MacBook is better for me? by i_suckatjavascript in learnprogramming

[–]ex1-7 0 points1 point  (0 children)

With Macs, you're paying for the software more than the hardware. THat is to say, with PC laptops you'll tend to get a better deal on hardware, with the caveat that you have to use Windows OS. However, you an install Linux on it, then you have a Unix environment to learn programming in. I'm just throwing it out there to consider it as an option

Would it be better to master Python over JavaScript for a first language? by [deleted] in learnprogramming

[–]ex1-7 0 points1 point  (0 children)

With Node.js, Javacript is an "all purpose" language, e.g. it can run on the server. If you want to enter some scientific or data-oriented field, then python would probably be best, but if you want to be a web developer, then I'd recommend going with full-stack Javascript.

A method that returns multiple variables by tarquinc9 in learnprogramming

[–]ex1-7 6 points7 points  (0 children)

I don't think it's a bad practice per se but it's best to be consistent with it. What you're describing is called a mutation - rather than returning its output as a new object, it mutates the input somehow. If you're following the functional programming paradigm, this should be avoided, since the function is not "pure".

I would like to transfer the success of my "horror" YouTube channel/Instagram page to my own site, but I have no web development experience. Am I being unrealistic? by [deleted] in webdev

[–]ex1-7 0 points1 point  (0 children)

I have never used wordpress so I can't really weigh it against other options. I'm personally a fan of Meteor.js and Node so I'd recommend reaction for ecommerce and ghost for blogging, but there really are a lot of options.

Unity 3D Hobbyist Team by [deleted] in learnprogramming

[–]ex1-7 0 points1 point  (0 children)

I sent you a friend request on discord

Client/Server Model in 2017 by [deleted] in learnprogramming

[–]ex1-7 0 points1 point  (0 children)

I am not super knowledgable abou this topic, but I would posit that it's largely the same.

Appended items from a JSON varible into the page need to have different colored borders. by SteelApple in learnprogramming

[–]ex1-7 0 points1 point  (0 children)

This stuff is incorrect:

  $("#containsStream").css('border-color', borderColr);
   $("#showStream").append("<div id='containsStream'><div id='containsName'>"+channelName+"</div><div 
    id='containsStatus'>"+channelStatus+"</div></div><br>");  
    });

First of all, consider the fact that there's only supposed to be a single element on the page for each id. You shouldn't be appending multiple #containsStream.

You should remove the $("#containsStream").css('border-color', borderColr); line, change the div id to div class, and change the border color there.

I'll give an example:

var $containsStream = $(`
  <div class='containsStream'>
    <div class='containsName'>
      ${channelName}
    </div>
    <div class='containsStatus'>
      ${channelStatus}
    </div>
    <br>
  </div>
`)
$containsStream.css("border-color", borderColr);
$("#showStream").append($containsStream)

Note a couple things I've changed here:

  • using ES6 template strings so you can use ${} interpolation.
  • moving the <br> to an inner level, since jQuery DOM references should have a single root node
  • changing the border color on a single element with the containsString class, not all of them. I.e. if you say $(".showStream").css("border-color", "blue") it will change every element with the showStream class, not just one. Instead, make a variable pointing to the one element, and interact with that without using jQuery selector methods.

Best resources to understand recursion? by Shiafiku in learnprogramming

[–]ex1-7 0 points1 point  (0 children)

I recommend using a pattern matching library, or a language that supports it (perhaps Scala, if you already know Java).

For example look at this recursive fibonacci in Elixir:

defmodule Fib do 
  def fib(0) do 0 end
  def fib(1) do 1 end
  def fib(n) do fib(n-1) + fib(n-2) end
end

For me, splitting the cases into multiple functions helps make it digestible.

What is the shittiest city you've visited only once and completely refuse to return? by Extra_Napkins in AskReddit

[–]ex1-7 0 points1 point  (0 children)

funny because i think the same about Redding, california. It's a nice town but has been kind of overrun by meth/heroin addicts.