2,750 karma · joined February 2, 2011
In TDD your test will always predate your understanding. So it forces you to solve (part of) the problem in your head first, rather than combine the act of problem-solving and writing. And you do this over and over again. And when you change your mind about something, you have twice the code to refactor.
It's a difference between recording your thinking in code and actually thinking in code.
This reminds me of an old article that exemplifies this: http://insideofthebox.tumblr.com/post/52002125683/prime-fact...
Prime factor kata is often used as an introductory example of TDD, yet it is clearly impractical and produces garbage code. Not to mention that I've actually seen people do it, stumble, and hectically reach for their notes to see what's the next step. And it's a pretty darn simple problem.
> If you can get away with it, outsource identity management to Facebook / GitHub / Twitter / etc. and just use an OAuth flow.
Questionable advice. At the very least neither of these two are some kind of automatic "best practice" everyone should just follow.
> it can be helpful to rename all those user.email vars to u.e to reduce your file size
Or maybe you should less JavaScript so length of your variable names does not matter.
Frankly, I don't understand why all those "interactive world" features people keep talking about cannot be decoupled from grinding and crappy PvP system.
Though the thing that completely cured me from online gaming was a certain MUD I was playing at the time (for several month, for at least an hour most of the days).
> the music would actually give them the same satisfaction they receive from manmade music
You believe this because...? None of the generated tracks I've heard so far is anywhere near the kind of music people would listen to for the sake of the music itself.
Some people do listen to music to drawn out distracting conversations around them. Perfectly sensible thing to do. However, in those cases music can be replaced with white noise of nature's sounds. This does not demonstrate that music is equivalent to noise.
...
The problem with such AI demos is that they lack a particular purpose (i.e. success criteria), use existing material for training and do not go a step beyond that material. You can take a track and slow it down by a random fraction to get a different pitch and tempo. Viola. "New music." Procedurally generated. But that does not mean you've composed something. You've used a randomized algorithm hand-crated to produce a particular effect. It has no generative power.
What is scary is the willingness of some people to accept dubious randomly-generated artifacts as "art" and as evidence of consciousness and intelligence. You should not trivialize actual human intelligence and creativity simply because you want to believe in strong AI.
GP post makes a very good points and (like usual, it seems) they get completely ignored in replies.
Setting up some 4/4 beat is easy. And you don't need an AI to throw is a randomly arpeggiated chord in there. It will sound okay-ish. Maybe it will even sound better than the stuff in this video. But that doesn't mean it is equivalent to proper music composition or that anyone would actually listen to that stuff outside of a technical demo.
BTW, if you want to see real procedurally generate music that is recorded by musicians for real listeners (as opposed to by CS grads for other CS grads) you might want to take a look at Karma: http://www.karma-lab.com .
I specifically mean the behavioral capacity of general intelligence
Any image-matching algorithm can be used to generate images. A simple color-matcher can be used to create very impressive things if plugged into a genetic algorithm, but no one claims it's conscious or intelligent. None of what you wrote here points out some fundamental differences between this and other image-generating techniques used before. You're simply trivializing what it means to be conscious or intelligent to the point that word is no longer useful.
I will consider an AI to be "generic" when it is able to apply training from one domain to an entirely different domain without any manual "mapping" from humans. For example, being able to decently play checkers after learning chess and being given a description of checker's rules. Applying training in image domain to image domain with tons of manual tweaking might be interesting and useful, but it's hardly qualifies as "mind-blowing".
Blatant sensationalism. There is absolutely nothing here that would suggest consciousness. If you have a mask for matching images, you can reverse that mask and imprint it as an image. What we're seeing here is a more complicated version of the same process. Heck, look more closely. Some of those "building" images have obvious chunks of pedestrians embedded, probably because the algorithm was trained on tourist photos.
Is it interesting? Yes, from algorithmic point of view. Cool as hell. However, this has nothing to do with consciousness.
If anything, some of those images are just a more elaborate version of a kaleidoscope. It's not like they run a network and got a drawing. They were looking for a particular result, did post processing, did pre-processing and tweaked the intermediate steps (by running them multiple times until the image looked interesting). Finally, we as viewers do our share of pattern matching, similar to how we see patterns in Rorschach inkblots. And there are captions that frame what we see and "guide" us to recognizing the right objects.
What you're saying is, essentially, that this guy's age should be ignored because his longevity is due to luck. But I haven't seen anything that rules out other possibilities.
| Root |
| Node | Node|
| Node | Node |
I stored only "X" and "Y" coordinates for every node, so you had to read "next" node in a row to get current node's "size".It was a bit more human-readable when looking at the data. More importantly, it reduced (on average) the number of nodes I needed to update on insert compared to nested set and gave an easy way of retrieving immediate children. But you still had to "move over" all the nodes "right" of the one you're inserting.
The structure in the article looks eerily similar. I wonder whether it's somehow possible to apply GitHub's optimization to this "coordinate" based schema and make it relative without messing up the benefits of column indexing. Hm...
A lot of these still happen, except they are using different technologies and look slightly different. We have parallax scrolling, Bootstrap-like modal windows, unlinkable single-page apps, websites that screw up "back" button and above all we have pages that require you to download several megabytes of junk and execute tons of JavaScript just to read several kilobytes of text.
"If you can't explain it to a six year old, you don't understand it yourself." - Albert Einstein
Because that forces you to actually think through your positions and argue for them using your own words, rather than deliberately obscure academic slang?
In natural sciences and math the simplest theory that works is the preferable one to use. In "modern" philosophy and various branches of academic criticism everyone tries to outdo each other in complexity. The practical result of it is that many people operate under false assumption: the assumption that if no one understands you, you automatically "win". This does nothing to improve the quality of reasoning or discourse.
"I understand that everything in HTML could also be represented in another format. But if your master data is in HTML, does it always make sense to convert the data to JSON just for the sake of it? Would you build a separate client-side rendering component only for that conversion?"
There two non-circular considerations that favor HTML:
1. Web pages still render via DOM. JSON data has to be tramsformed, HTML does not.
2. HTML has semantic capabilities. JSON does not.
Also, I wonder how Google handles security while executing random JS code. It's one thing to hack into a single browser. It's another thing to hack into a crawler. Think of all the possibilities.
What I don't understand is why some people agree that PHP is a horrible language, while at the same time praising JavaScript as messiah of scripting. These two languages don't just have problems, they have very similar problems. Moreover, they gained popularity for very similar reasons (lack of choice).
Seriously, if you posted something similar to OP about JavaScript the first thing people would tell you is "What, you're still not using ===?!"
It's a disingenuous argument introducing an artificial dichotomy.
If I can make a working website in HTML, but it works better with some additional JS, why exactly shouldn't I improve user's experience?
And on the other hand, content sites aren't the be-all, end-all of the Web anymore. The Web is increasingly a deployment platform for applications
Somehow I don't see a lot of these "applications". All I see is overly complex website that don't work without JS because developers don't know any better or don't care.
Survival of the fittest doesn't really apply to human artifacts and especially to art and cutting edge engineering.
<form action="x" replace="#y"> <!-- .. --> </form>
<div id="y" />
You submit the form, it loads the result in the background and replaces content of Y div with content of whatever has id="y" on the new page.
splice-result-into takes any CSS selector as its parameter, so you can apply this to multiple elements at once.
The entire library is around 100 lines of code with no dependencies. 100% backwards compatible, degradable and easy to add to existing multipage apps. It could easily be implemented as a standard HTML feature.
Sorry, I meant my college calculus courses, although incidentally the statement applies to both.
I think colleges would be much better off teaching introductory math as "applied". I got significantly more out of statistics, because that class taught us how to spot problems where that branch of mathematics is applicable. I really liked how Udacity used real-life orbit calculations from various space missions as assignments. It gives the whole thing some context.