Older blog entries for sness (starting at number 4832)

Coding a Simple Octree | Brandon Pelfrey

Coding a Simple Octree | Brandon Pelfrey: "Octrees are fundamental in many computer graphics and simulation applications, but I found myself writing one for the first time last weekend, so I thought I’d share the basic ideas and show some code demonstrating how it could be used. The code for this post is available on Github for those eager to jump the gun, but below is an explanation of the semi-interesting parts of the code."

Syndicated 2013-01-07 19:30:00 from sness

Testing Your JavaScript with Jasmine | Nettuts+

Testing Your JavaScript with Jasmine | Nettuts+: "TDD in its simplest form is just this:
Write your tests
Watch them fail
Make them pass
Refactor
Repeat
That’s pretty easy to understand, eh?"

'via Blog this'

Syndicated 2013-01-07 19:30:00 from sness

How do I Jasmine: a tutorial | Evan Hahn dot com

How do I Jasmine: a tutorial | Evan Hahn dot com: "Unit testing in a nutshell: Basically, your program will have a bunch of functions and classes. You want to make sure that, no matter what you throw at them, they'll perform how you want them to. For example, this function should always return a string that says "hello" in it. Unit testing ensures that everything goes down exactly how you planned. It's like you're God...but it's probably a little more boring because it's code."

'via Blog this'

Syndicated 2013-01-07 19:30:00 from sness

homoiconic/2013/01/practical-applications-of-partial-application.md at master · raganwald/homoiconic · GitHub

homoiconic/2013/01/practical-applications-of-partial-application.md at master · raganwald/homoiconic · GitHub: "What is partial application? And most importantly, why do we care about it?

"

'via Blog this'

Syndicated 2013-01-07 19:30:00 from sness

functional orbitz: Deconstructing Zed's K&R2 Deconstruction

functional orbitz: Deconstructing Zed's K&R2 Deconstruction: "The primary argument is that K&R2 is not an appropriate tool for learning C in our modern age. The example given is a function called copy which is effectively strcpy. Zed points out that if the function is not given a valid string, as C defines it, the behaviour of the function is undefined."

'via Blog this'

Syndicated 2013-01-07 19:29:00 from sness

How to write a test description | Ovid [blogs.perl.org]

How to write a test description | Ovid [blogs.perl.org]: "If you were to read the TAP grammar, you would see the following line:

test ::= status positiveInteger? description? directive?
What that means is that a test line of TAP (if you read the rest of the grammar) must have an "ok" or "not ok" bit, followed by an optional test number (in practice, it's almost always there) and a test description (the directive refers to "skip" or "todo" tests). Sadly, many people don't pay attention to the powerful benefits of the description. A bad description may as well be left off; a good description is the difference between a pile of confusing code and documentation."

'via Blog this'

Syndicated 2013-01-07 19:29:00 from sness

AMD · amdjs/amdjs-api Wiki · GitHub

AMD · amdjs/amdjs-api Wiki · GitHub: "The Asynchronous Module Definition (**AMD**) API specifies a mechanism for defining modules such that the module and its dependencies can be asynchronously loaded. This is particularly well suited for the browser environment where synchronous loading of modules incurs performance, usability, debugging, and cross-domain access problems.

It is unrelated to the technology company AMD and the processors it makes.

"

'via Blog this'

Syndicated 2013-01-07 19:28:00 from sness

Why AMD?

Why AMD?: "SUGAR
§ 7
The above AMD example works in all browsers. However, there is a risk of mismatched dependency names with named function arguments, and it can start to look a bit strange if your module has many dependencies:
define([ "require", "jquery", "blade/object", "blade/fn", "rdapi",
"oauth", "blade/jig", "blade/url", "dispatch", "accounts",
"storage", "services", "widgets/AccountPanel", "widgets/TabButton",
"widgets/AddAccount", "less", "osTheme", "jquery-ui-1.8.7.min",
"jquery.textOverflow"],
function (require, $, object, fn, rdapi,
oauth, jig, url, dispatch, accounts,
storage, services, AccountPanel, TabButton,
AddAccount, less, osTheme) {

});"

'via Blog this'

Syndicated 2013-01-07 19:28:00 from sness

volojs/volo · GitHub

volojs/volo · GitHub: " volo create fast (uses [volojs/create-template](https://github.com/volojs/create-template) for project template)
> cd fast
> volo add jquery (uses jquery/jquery as the repo)
> volo add underscore (uses amdjs/underscore as repo since an AMD project)
> volo add backbone (uses amdjs/backbone as repo since an AMD project)"

'via Blog this'

Syndicated 2013-01-07 19:28:00 from sness

volo

volo: "Quickly add javascript libraries by using a search term, GitHub identifier, or raw URL.
Queries github for 'jquery', then downloads latest version
volo add jquery
Adds backbone as well as underscore and jquery
volo add backbone
Uses semver to add latest 2.x version of requirejs
volo add requirejs/~2
Add the amdjs github group's version of backbone
volo add amdjs/backbone
more about add
"

'via Blog this'

Syndicated 2013-01-07 19:28:00 from sness

4823 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!