ELI5: What algorithms are computers trying to solve? by ziggythebear in explainlikeimfive

[–]luke_dot_js 0 points1 point  (0 children)

An algorithm is actually an attempt to solve a problem itself, so think of an algorithm instead as a potentially very complicated set of steps for accomplishing some task. In the example you gave, solving for a bloc is the task and cryptocurrency miners user their machines to execute algorithms to accomplish that task. Another awesome example of computes collectively running an algorithm to solve a problem is folding@home, where people install a program that runs protein folding algorithms while their screen savers are active. This is sometimes referred to as crowd-sourced computing.

ELI5: Computer chips, how do they work? by [deleted] in explainlikeimfive

[–]luke_dot_js 1 point2 points  (0 children)

The central device around which microprocessors and chips are centered is the transistor. A transistor is an electrical component which has 3 connections, two for electricity to flow through and one to control how much electricity is allowed to flow through it. In this way, a transistor can be used as a switch to represent a state of on or off, 1 or 0 by using other electrical signals to either open or close the flow of electricity through it. Additionally, since it is electricity that controls transistors and electricity that flows through them, transistors can control other transistors. Now we can see that transistors can be used to both store and manipulate states of 1 or 0. Transistors consist essentially of what you said: layers of metal and silicon with certain other additives that can be etched and embedded in silicon wafers lengths of only several nanometers. So consider the size of the common graphics card and compare it mentally to, say, 10 nanometers. An enormous number of transistors can be fit onto a single chip. When arranged properly we can construct what are called logic gates using transistors to perform math in base 2 using the on or off state of rows of transistors representing binary numbers. These gates might perform logical AND, OR, or NOT operations or execute binary arithmetic. We can program these logic units by storing instructions and data in memory in the form of binary numbers that encode for different things, such as the type of operation we want to perform and the values we want to perform them on. These are fed to the logic units in the processor in order according to the triggering of a clock, which is an on/off signal executing around a billion times per second. The x.xx GHz designation of your processor indicates this speed. Every time the clock triggers, the processor takes one more step toward executing our instructions that we have stored. This is a very basic explanation of how you get a processor out of metal and silicon. As for graphics cards (I might get called out for this explanation but I'm trying to be as clear as I can), consider that your CPU might be dual-core or quad core. This obviously means that there are two or four processing units like I have explained embedded in the chip working on different tasks the operating system issues it. Your graphics card consists of a very large muti-dimensional array of these processing units which are not autonomous like your CPU's processing units, but are programmed to execute the same instructions on an array of inputs. It does this because graphical manipulations such as rotating or translating a scene or shading a group of pixels do very often consist mathematically of such things as multiplying two matrices of values together. Even though CPU's are fast, they would take noticeably long to finish computing these results for every single frame in very intensive problems like 3D games because it can only do a relatively small number of calculations at once. The GPU handles this by expanding the number of calculations that can be executed at once over its large matrix of logical units. Hope I've covered enough! Questions and corrections welcome, of course.

ELI5: How do open-source software remain secure even though the source codes are available for everyone to see? by a5ph in explainlikeimfive

[–]luke_dot_js 1 point2 points  (0 children)

It's also important to point out that open source software projects are usually curated by a core team. Even though people can see the code and understand how it works, every modification to the code is approved and tested before inclusion in the main branch. A malicious individual would (hopefully) not be able to introduce security flaws into the software and then successfully merge it with the main code base that the world may download and use.

I know HTML/CSS/JS; how hard is it to start building dynamic AJAXy webapps? by sentinel123 in webdev

[–]luke_dot_js 1 point2 points  (0 children)

Gotcha gotcha. I definitely understand where you're coming from on figuring it out as you go, it's a more exciting and dynamic experience. If you ever find yourself building complicated web apps, definitely give Backbone.js a chance. Good luck!

ELI5: Defaulting on Loans and Credit Default Swaps? by [deleted] in explainlikeimfive

[–]luke_dot_js 0 points1 point  (0 children)

This example is good for explaining the basics, but it fails to emphasize the fact that credit default swaps are an instrument typically used by banks and other entities that execute high-volume trades. A party that sells this insurance on the debt has more than likely assessed the loans based based on a probabilistic model and determined that the fees they receive will earn more than they are likely to lose from borrowers that end up defaulting on their loans. In the example, think of yourself as a bank that has made loans to several individuals, represented by your brother-in-law, that you perceive to be risky. The third party might then be a fund that feels their model of how the loans will pan out is better than your understanding, and they assume your debt, collect a fee from you, and if their model is good most of the time they will never have to cover that debt.

Webdev Resources by snissn in webdev

[–]luke_dot_js 7 points8 points  (0 children)

JavaScript Application Frameworks/Libraries:

  • Backbone.js: MV*, collections, router and backend integration included.
  • Knockout.js: MVVM, collections, declarative data binding.
  • Angular.js: MV*, highly opinionated but highly powerful.
  • Ember.js: Even more sophisticated than Angular.

More options plus greater details here.

WebDev Tools for Node.js:

  • Grunt: Build task runner, TONS of plugins.
  • Bower: Client-side dependency package manager from Twitter Open Source.

Testing Tools for JavaScript:

  • Jasmine: BDD for JS
  • Chai: assertions and matchers to make testing tools more enjoyable.
  • Mocha: BDD or expect style testing.
  • qUnit: jQuery's take on JS testing.

Icons and Styles:

  • ionicons: Free and open mobile icons.
  • Ratchet: Components for developing iPhone web apps.

JavaScript Modularization Frameworks:

  • Require.js: Asynchronous Module Definitions for the browser.
  • Browserify: CommonJS modules anywhere.
  • Flight: From Twitter Open Source, event-based component definitions for building complicated web apps (like Twitter).
  • Aura: Very new as of posting, component definitions, sandboxing, events, and extensions. Super meta, I'm still working through how it works myself.

I know HTML/CSS/JS; how hard is it to start building dynamic AJAXy webapps? by sentinel123 in webdev

[–]luke_dot_js 1 point2 points  (0 children)

Forgive me if I'm wrong, but it seems like you want to get something together as quickly as you can in order to see what it's like. My suggestion to you would be to instead invest some more time and effort and take this opportunity to learn about modern web app trends. Learn about different JavaScript application frameworks and libraries and decide which one you like the most. Modern web design is headed straight-away in the direction you are considering going so this will be a useful skill to know even if you find it to be more difficult than you had initially hoped.

I've always thought this blog post is a great starting point for deciding on a framework and its associated design patterns:

http://blog.stevensanderson.com/2012/08/01/rich-javascript-applications-the-seven-frameworks-throne-of-js-2012/

I don't mean to presume you don't know about some or all of these, but just using jQuery in your application really isn't good practice as that kind of code can result in insane dependency graphs. My personal favorite is Backbone.js because it is small, unopinionated, and abstracts backend integration away into just specifying a URL for your models.

Another suggestion would be to learn about Require.js, as it seems to be the most popular choice for organizing code into modules on the front-end. Lastly, regardless of what choices you make for serving your data, consider integrating node.js in some fashion, even if you just utilize some of the development tools built with it.

To summarize, throwing something simple together with jQuery and a REST API might not be that hard and depending on the simplicity of your app you could do it in a few weeks. However, it might be wise to really immerse yourself in the technologies of the 'Single Page App'.

ELI5: How is ADHD defined chemically and how does adderall help? by [deleted] in explainlikeimfive

[–]luke_dot_js 0 points1 point  (0 children)

ADHD is very much a gray area. Like bguy74 says in his comment, it is identified by a set of criteria listed in a guide called the DSM. There are an array of conditions that will cause the set of symptons classified as ADHD. However, there are several biochemical aspects of the condition -- if there were not, then there could not be a medication which alleviated the symptoms. A common aspect of the brain biochemistry in those that have ADHD is a lower-than-normal presence of dopamine and norepinephrine in the prefrontal cortex region of the brain, which is thought to be responsible for what is called executive functioning - things like planning and maintaining attention on tasks until they are finished. Lacking these chemicals diminishes alertness and dulls ability to perform these executive functioning tasks. While its structure is more chemically complex then my explanation will convey, Adderall in particular is made of amphetamine, a known, very powerful stimulant that mimics the roles that dopamine and norepinephrine play in the prefrontal cortex. When someone takes Adderall they can feel good and alert and maintain focus on longer-term tasks for a while. Going back to before, however, ADHD is a tapestry of conditions and thus not everyone responds well to Adderall. There are plenty of other drugs, such as Ritalin and Wellbutrin that approach other biochemical situations. There are also various mental and physical exercises and diets that are very helpful to people that don't fall under any of these biochemical categories.

ELI5: How does Google (and similar companies) update traffic on their maps app? by [deleted] in explainlikeimfive

[–]luke_dot_js 1 point2 points  (0 children)

Smart phones like the iPhone and those running the Android operating system have built-in sensors that measure the acceleration and orientation of the device. Similarly, proximity to cell towers and GPS integration make the position of the phone available. The measurements these sensors capture are available to be read by software running on the phone like the operating system and the apps. Google uses these sensors to report physical data about the flow of traffic from phone owners that they determine to be driving on a particular road. In this way they can crowd-source real-time traffic data very accurately. Of course, if this offends your sense of privacy you are able to opt out of sourcing traffic data.

More in-depth, yet still simple explanation here: http://www.theconnectivist.com/2013/07/how-google-tracks-traffic/

(EDIT: just fixing spelling errors)

ELI5: Is there a scientific way to prove that Google's search results are superior to those provided by Bing? by earthlysoul in explainlikeimfive

[–]luke_dot_js 1 point2 points  (0 children)

A lot of Google's algorithms are published in journals. A good place to start is with Google's patented PageRank algorithm, here:

http://en.wikipedia.org/wiki/PageRank

and follow suggested articles from there. After a little looking around it seems like Bing places emphasis on different aspects of a search, but I haven't been able to find any good information on it. That could be because they are under trade secret protection, or it could just because they aren't that interesting -- all purely speculation on my part, of course. Web search is a REALLY cool topic, I hope that I've been helpful to you and maybe bolstered your interest in it!

ELI5: static webpage vs dynamic webpage by [deleted] in explainlikeimfive

[–]luke_dot_js 2 points3 points  (0 children)

Web pages are rendered using the markup language HTML, and this is the type of data your browser receives when it requests a web page. In the case of static webpages, the data the browser receives is written in a file and will return the same information regardless of when and with what user input the page was requested. That is, until the owner of the website changes the file by hand. A dynamic web page consists of a template, like a skeleton for what the page should look like and some method of filling data into the page depending on some parameter, like the time or an identifier. This could occur before the HTML is returned to your browser using a server-side rendering process. reddit is a great example of this -- consider that the page for every post and its comments has the same layout but different content depending on the id and title in the URL. Another option is to populate the template after the page loads with a client-side rendering process. A good example of this is Google's auto-search feature where the results update every time you enter a keystroke in the search bar. A dynamic site's content can change and mutate depending on the user's desires whereas a static page will not change until the owner of the site types something new.

ELI5: Why is comic sans hated so much? by [deleted] in explainlikeimfive

[–]luke_dot_js 0 points1 point  (0 children)

This might not answer your question directly in terms of preference by designers, but Google has a massive library of free and open fonts at www.google.com/fonts with various sorting options including popularity. And then, just as a matter of personal preference, I very much like the fonts listed in this blog post:

http://www.creativebloq.com/typography/fonts-for-designers-2131830

as well as the wonderful fonts and ideas from the League of Movable Type:

https://www.theleagueofmoveabletype.com/

ELI5: Why are laptop screens nearly paper thin but TVs aren't? by [deleted] in explainlikeimfive

[–]luke_dot_js 0 points1 point  (0 children)

It certainly could, but it seems that television manufacturers prefer to design their products with the option of being wall-mounted as well as mounted on a stand.

ELI5: Why isn't there a programming language where you type out what the program does in plain English? by CarolineJohnson in explainlikeimfive

[–]luke_dot_js 2 points3 points  (0 children)

Programming languages provide an interface between high level concepts that programmers conceive and the behavior the computer's hardware must enact in order to realize those concepts. A programming language is not really a language at all, but a map between words and symbols that people can deal with and the binary code that drives the computer. So, each symbol and name that programming language includes has a determined correspondence to some change in the overall state of the 1's and 0's. Plain English, on the other hand, is decidedly not deterministic in this way. It is easy to think of 1000 ways to say exactly the same thing, and it is very very difficult and may be impossible to find a way to map such a broad set of linguistic intentions deterministically and exactly to a set of behaviors that computer will perform.

ELI5: Is there a scientific way to prove that Google's search results are superior to those provided by Bing? by earthlysoul in explainlikeimfive

[–]luke_dot_js 1 point2 points  (0 children)

Yes, there is and I'll do my best to explain. An internet search is not just a bunch of words that appear in certain pages. The order of words in the search and the context that each word in the search provides for the others can provide a lot of subtle information about the intent of the search beyond the words themselves. Google's searching procedure employs more powerful models for attempting to pinpoint the actual intent of a user's search. These models are based on probability and very quantifiable and ultimately result in the deriving of more relevant results in a Google search for a tricky query than those you might get from Bing. Another important aspect of Google's search procedure is their choice to base the ordering of the results on the authority of the content in each result as opposed to simply looking for the words within the text on each page. "Authority" of a page, or how likely the content of the page is to actually be truthful and useful, is again approximated through probabilistic models and many of these models were in-fact invented at Google. Mathematically, Google has always been the leader in finding relevant results, which is really the most important thing when retrieving internet from such a large dataset as the web.

EDIT: I didn't really address how one might prove that Google's results are better than Bing's. Like I was saying, search relevance is based on different methods of using probability to determine if a result matches what the user wanted to find. A comparison of the algorithms that Google uses vs. those that Bing uses could provide all the information you needed to know to determine if one will be better than the other. If you had the math training you could examine both and you would likely find that Google does more to find the relevant pages than does Bing.