search results matching tag: Algorithm

» channel: learn

go advanced with your query
Search took 0.000 seconds

    Videos (129)     Sift Talk (9)     Blogs (9)     Comments (307)   

"Alternative Math" - The confusing times we live in

bcglorf says...

Har har har.

I went through every calculus class my uni offered, so not so much.

Mayhaps I didn't explain the example given in enough length. The simple operations of addition, subtraction, multiplication, division all have a single correct answer. Insisting that students find multiple methods of performing those operations and demonstrate multiple different learning methods for them is mental masturbation. You could spend that same time actually moving on to the more advanced stuff that is supposed to 'in theory' prepare them for.

Another example was solving a double digit multiplication problem like 37*86. The marking example showed a student using the old school vertical method and showing their work to arrive at the correct answer. The provincial grading system declared that as WRONG. The student was 'falling back' on the algorithm and should have demonstrated the use of multiple methods of solving the problem. That is idiocy.

Basic add/subtract/multiply/division isn't MATH it's arithmetic and it's a basic operation with a single answer and so long as you use a correct method to arrive at the correct answer you are good to go. Teach students that foundation and then move on to teaching them actual MATH. Read through our provincial curriculum, they are STILL teaching add/subtract/multiply/division at the Grade 11 level in the curriculum on the premise that students are still 'mastering' something that should've been a given by junior high.

newtboy said:

What you describe is called a "proof" (a pretty simplistic one). It is not a new concept, it's an integral part of doing math. I learned that in the early 80's, right before trig/pre calculus.
Maybe it just seems insane because it's more advanced than your last math class? It's absolutely not institutionalized stupidity....it's standard math.

FizzBuzz : A simple test when hiring programmers/coders

ChaosEngine says...

I got distracted by all the blinking lights. Where is he... the Death Star control room? Frankly, I'm mildly jealous that my work place does not look as awesome as that.

As to the test itself, it's way too basic. I would expect any beginning programmer to be able to write that with only a few hours training. You could make it slightly more challenging by adding some arbitrary restrictions like "don't use a for loop" (i.e. use recursion) but those are pointless academic wankery.

I actually wrote tests and hired a coder earlier this year. This test wouldn't have got you an interview, never mind a job.

You want to impress me? Start out by writing a test that verifies the output. I don't care if it works, I want to know you can PROVE it works. While you're at it, if I see a console.log or a printf or a cout or any kind of output in your algorithm (unless it's just there for debugging)... instant fail. Learn to separate presentation from logic.

Finally, if you REALLY want to impress me, make it scale. 100 numbers? Meaningless. 1 million? 194ms on my machine.
Write me a version that can do several billion and take advantage of whatever threads/cores are available,

Sumo Robot Wrestling

Spacedog79 says...

I think that was the 'slapstick comedy' algorithm.

MilkmanDan said:

That one was cool. Very interesting to try to infer what their algorithms / strategies are based purely on their emergent behavior.

I'd label 3:46 a "come at me bro" strategy -- present a target and attempt escape when the opponent charges.

Lots of "spirograph / can't hit what you can't see" in there. Never sit still, go straight until the edge of the ring is detected, turn and repeat.

And the "matadors" are also very interesting, with their distracting / confusing actuated flags.


As an aside, I'd assume there are weight classes?

Sumo Robot Wrestling

MilkmanDan says...

That one was cool. Very interesting to try to infer what their algorithms / strategies are based purely on their emergent behavior.

I'd label 3:46 a "come at me bro" strategy -- present a target and attempt escape when the opponent charges.

Lots of "spirograph / can't hit what you can't see" in there. Never sit still, go straight until the edge of the ring is detected, turn and repeat.

And the "matadors" are also very interesting, with their distracting / confusing actuated flags.


As an aside, I'd assume there are weight classes?

AeroMechanical said:

3:46 is my favorite.

Tabs v(ersu)s Spaces from Silicon Valley S3E6

MilkmanDan says...

(**EDIT** hmm, code HTML tag doesn't seem to allow whitespace to show at the beginning of lines, so I'm replacing spaces with _underscores_ in the pseudocode below)

Code uses spaces or tabs to visually distinguish the flow of the program, what code belongs to what functions / loops / whatever.

Here's some C-style "pseudocode" that should get the idea across:

void function fizzbuzz {
__for (i = 1; i <= 100; i++) {
____set print_number to true;
____If i is divisible by 3
______print "Fizz";
______set print_number to false;
____If i is divisible by 5
______print "Buzz";
______set print_number to false;
____If print_number, print i;
____print a newline;
__}
}


The braces { } show the beginning and ending of a "function" (essentially one of potentially many self-contained algorithms in a program) and the beginning and ending of a "for loop" (that will repeat the code inside it some number of times). And the "if" statements will only perform the stuff after them IF the test they perform evaluates to true.

So in that pseudocode, there's sort of 4 tiers or things going on. First is the function (named "fizzbuzz"). Since functions are kind of the most basic structural unit of the code, they are on the far left -- not indented at all. Sorta like Roman Numerals in an outline.

Then, the actual content of that function (the code that makes up its algorithm) is set a consistent amount of space to the right to make it clear that it is contained inside the function. That can be done with *1* tab, or some consistent amount of spaces so that it lines up. The only thing in that tier is the "for loop" and the braces that show its beginning and end.

Then the content of the for loop is set a bit further to the right (with another space or another set number of spaces). All of the "if" statements are at that 3rd tier level, along with a bit more code at the beginning and end. Then, the actual content of the if statements is set one more tier to the right to help distinguish that it will only run IF the conditions are met.

That pseudocode uses spaces for all of the tiering -- 2 spaces per tier. I'm a tab person like the guy Richard in the video, because it seems easier to press tab once per tier than hitting the spacebar 2/3/4 times per tier. But it really is just a personal preference issue, because as he said in the video, by the time the code is compiled (turned into an executable file that the computer can run) the final result will be the same whether the programmer used spaces or tabs.

But like with many things, Silicon Valley really hits the nail on the head here. Programmers tend to be very set in their ways and anal about their style preferences for code. If we have to go through someone else's code that doesn't follow our style conventions exactly, it kinda tends to throw us out of whack. To make an analogy with something less nerdy, consider how annoying it can be when someone borrows your car and you have to adjust the seat / mirrors / radio stations etc. when you get back in.

eric3579 said:

Don't think i've ever used a tab outside filling in a form or playing video games. Does the tab thing have more to do with writing code?

Terrifying RC Helicopter Breaks Reality

transmorpher says...

There's no way you could take one, let alone two of these down with any amount of human aimed gunfire!

If there was an algorithm flying it to randomize the movement, no chance to hit it ever.

Briguy1960 said:

Who needs cgi ?
The future of warfare looks ominous with drones attacking in waves numbering in the thousands doing shiz like this.

Neural Networks for Character Control

The Adpocalypse: What it Means

MilkmanDan says...

I agree that NoScript tends to make it a hassle to get basic functionality out of the vast majority of the web. You have to play around with allowing scripts from some domains and not others, on pretty much every page you visit.

...Which is pretty scary, if you think about it. Are all of those cross-site scripts beneficial or even necessary from a user standpoint? Hell no. Users stand to gain nothing from all that crap running. From our perspective, they just increase load times and data usage, often compounded with auto-reloading. We should have control over that stuff in all circumstances, but it becomes absolutely critical in mobile internet where we generally don't have as much processing power AND the vast majority of people have data usage caps.

Basically what I'm saying is, the admitted fact that NoScript tends to make the web unusable is a symptom of a deeper problem with how the web is constructed these days.

If you like the idea of NoScript, but generally find it too high-maintenance, you might want to try Privacy Badger. It requires somewhat less user input with regards to which trackers/scripts get blocked, instead going with defaults based on "trustworthiness" as measured by algorithms from the EFF. Those defaults can be tweaked if you desire, also.

I usually run a Firefox (or Pale Moon) client that is extremely locked down. UBlock Origin, NoScript, Privacy Badger, Self-Destructing Cookies, sometimes Ghostery, etc. I use that as my default browser, and take the time to fine-tune the controls in NoScript, element hiding in uBlock, etc. for sites that I visit regularly.

But frequently, I'll find a link to some article that I want to read and notice that the page content won't load at all since it requires some nonsensical script. In those cases, if I don't want to take the time to fiddle with NoScript etc. permissions, I copy the URL and fire up Chrome in incognito mode, with only uBlock Origin.

Probably not worth the hassle for most people, but I guess I'm kicking and screaming my way into this brave new world.

ChaosEngine said:

Just for the record, I do run ad block plus on chrome.

@00Scud00, I used to run noscript, but it pretty much made the web unusable, or I spent so much time enabling js on certain sites it wasn't worth it.

A.I. Is Progressing Faster Than You Think

Ickster says...

For the time being, I don't think that's a concern; with all of the incredible progress being shown in using neural networks to replicate (and yes, improve on) human skills, I'm not aware of any real advances in any field related to giving AI any sort of actual will.

What's more concerning to me is how this sort of technology will be put to use to categorize and control people. I'm not talking about shadowy cabals, or even evil corporations--I'm talking about the unintentional consequences of being able to accurately reduce people to a set of metrics and predictable behaviors, and how that may push culture to a bland algorithmic mush rather than the chaotic but vibrant human mess it's always been. Time will tell, I guess.

ChaosEngine said:

That is really cool and very scary.

What are the chances of us being able to control an AI? Next to zero, IMO.

Digital Hygiene: How We Might've Fucked Our Attention Spans

Digitalfiend says...

I was born in the late 70s and had the fortune to experience the early days of personal computing and the internet via BBSes. The biggest issue I've personally experienced with the modern internet is the ease at which you can get side-tracked by deep links. I've lost count of the number of times I've started researching something work-related in the evening only to end up linking through two or three related articles and ending up on a YouTube video about the latest game trailer or whatever.

I've also noticed that my reading habits have changed. Instead of reading articles in their entirety, I will, at times, read a few sentences to get the gist then scan ahead to continue reading. I never used to do this but it is something I've caught myself doing with greater frequency over the past couple of decades. This has tripped me up a few times where I've had to go back and read the information again. I wonder if children that have grown up with the modern internet and its web of distractions (pun intended) are even worse off.

Maybe our brains are trying to adapt to a new way of gathering and processing so much disconnected information (e.g. one minute you're reading about a physics algorithm the next minute about screaming space goats). Perhaps it is a way to contain information overload and only retain what is useful?

The internet is an AMAZING invention and something everyone should have access to and be taught how to use effectively. As was mentioned above, you can pretty much teach yourself anything using the internet. The challenge is staying focused and sifting through all the ads, fluff articles, and random garbage that you get bombarded with every time you browse a website.

SSL Now Enforced Site-Wide (Sift Talk Post)

ant says...

Ah. Late last night after 11 PM PST, VS was showing:

"Secure Connection Failed

An error occurred during a connection to videosift.com.

Cannot communicate securely with peer: no common encryption algorithm(s).

Error code: <a rel="nofollow" id="errorCode" title="SSL_ERROR_NO_CYPHER_OVERLAP">SSL_ERROR_NO_CYPHER_OVERLAP

The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.

Please contact the website owners to inform them of this problem."


https://s28.postimg.org/9id7f2tjx/ssl.jpg for a screen shot/capture from SM's Page Info's Security tab.


I could reproduce this error in both of my computers (64-bit W7 HPE SP1 OS & 64-bit Linux/Debian Jessie/stable)'s SeaMonkey v2.46 web browsers. Also, Firefox v51 in my Debian box. I could not reproduce it in W7's IE11 & Debian's Chrome v50 web browsers that aren't based on Mozilla's Gecko engine.


I told Dag and Lucky760 about it, and it was fixed about 1.5 hours later. Kudos to the quick fixes!

radx said:

At that moment, Firefox 51.0. But I've had some ciphers disabled since the early days of Logjam attacks, which included all ciphers using Diffie-Hellman without elliptic curves. That's why there was no overlap between accepted ciphers on my end and ciphers supplied by VS.

Visualization of 24 Sorting Algorithms In 2 Minutes

Full Throttle Remastered - Teaser Trailer

ForgedReality says...

The original game was only a couple of hours long, and not really worth playing more than once. Not sure how this is gonna be a worthy contender in today's modern gaming landscape unless they change the story a lot to add a lot more content and perhaps replayability.

But I don't really see how this is remastered. Remastered games in the past have been a lot more drastic. Like the Monkey Island series or King's Quest. This just looks like they ran the graphics through a resample algorithm. Not feeling it.

The World's Most Famous Teapot: The Utah Teapot

entr0py says...

I'm not sure why it took off the way it did, but the University of Utah had a huge influence on the history of computer graphics. The founders of Silicon Graphics, Adobe and Pixar all came from there. And if you're into computer graphics you have probably heard of algorithms named after Gouraud, Phong, and Blinn, all of them were Ph.D students in the 70s at the school. It just seems like a crazy amount of foundational work took place there over the course of 20 years.

http://www.cs.utah.edu/about/history/

Family Feud SNES- Nonsensical Answers

mas8705 says...

Yep. The Algorithm that the game uses (as I said for "misspelling if you will) can be manipulated in a sense where in spite of how randomly long the response is and how nonsensical it is in context, as long as it identifies the letters well enough, it will give it to you. One example I loved was "Opps I pressed it" which the game recognized the somewhat as "Spee_ _i_it" and from there gave us "Speed Limit." Or "Bullshit Boston Lawyer" and it was able to figure out "Busboy" out of a few of the letters.

That's half the fun of this video, to try and decode these patterns.

rancor said:

That Hall family looks pissed.

(edit) Wow, didn't even read the description first.

(edit2) I think I gleaned the specific algorithm watching the whole thing through. The player just has to enter the answer's letters in the right order, with anything between them.



Send this Article to a Friend



Separate multiple emails with a comma (,); limit 5 recipients






Your email has been sent successfully!

Manage this Video in Your Playlists

Beggar's Canyon