Blog
Categories
- Mar 11 2010
Quickest Loop Through an Object
A little experiment to find the fastest for-loop for an object. Approx. Results: ARY-INDEX: “for(var i = 0” -> 13ms OBJ-INDEX: “for(var i = 0” -> 218ms OBJ-KEY: “for(var i in” -> 975ms var len = 1000000; // ARRAY VERSION var check = 0; var ary = []; for( var i = 0, l = […]
Continue ReadingQuickest Loop Through an Object- Tagged in:
- performance
- Mar 10 2010
Faster Javascript – Part 2
In Faster Javascript Part 1 we compared a three methods for evaluating a string of alien DNA. With Switch, Boolean & Conditional going head to head, Switch was the clear winner with Conditional (Ternary) trailing way behind. Testing methods is one thing, but there’s more to writing fast code than just testing. For example: order […]
Continue ReadingFaster Javascript – Part 2- Tagged in:
- performance
- Mar 06 2010
Long Division In Javascript
We are exploring the possibility of developing a workshop to help high-school students solidify their knowledge of core mathematical concepts using a computer to write Javascript code. The best way for a student to demonstrate and reinforce knowledge of mathematical concepts is to be able to teach them or explain them to another person. We […]
Continue ReadingLong Division In Javascript- Tagged in:
- performance,
- tools and workflow
- Mar 02 2010
Compiling Clarkson’s Hull in OS X
If you’re interested in parametric or generative design (the terminology doesn’t seem to be well standardized) you have probably run into Voronoi diagrams and their cousins, Delaunay triangulations. The latter can be used to make concave hulls given an input point set, a construction which is called an Alpha Shape. Jim Clarkson wrote a great […]
Continue ReadingCompiling Clarkson’s Hull in OS X- Tagged in:
- performance,
- tools and workflow
- Feb 23 2010
Get Triangle Height in JavaScript
How to find the height of a triangle in JavaScript if you only have the 3 vertexes/points of the triangle. Assuming that XY are the top of your triangle, and X1Y1, X2Y2 are the other two points, you can find the height of the triangle using Pythagorean theorem. This method works for Isosceles or Equilateral […]
Continue ReadingGet Triangle Height in JavaScript- Tagged in:
- performance,
- tools and workflow
- Feb 22 2010
JavaScript Credit Card Validation
I was reading 2600 on the bus recently and came across a credit generation algorithms which got me thinking… if you are building a web application that charges credit cards, at which point would card validation make most sense? I came to the conclusion that an efficient system, would check the credit card number was […]
Continue ReadingJavaScript Credit Card Validation- Tagged in:
- performance,
- tools and workflow
- Jan 25 2010
PollenJS Contributor Announcement
I’m pleased to announce the addition of Elijah Grey as a core contributor to the PollenJS project. Eli has an exceptional (albeit short) background in JavaScript development using bleeding-edge technology. Just the kind of guy we like to have around bocoup.com. A few thing that Eli and I have already begun hashing out: Modular loading […]
Continue ReadingPollenJS Contributor Announcement- Tagged in:
- javascript
- Jan 22 2010
jQuery Docs Keyboard Navigation
Today, keyboard navigation went live on the new jQuery documentation site: api.jquery.com. Rick worked really hard on getting the interaction just right, and we think this makes using the documentation a faster and easier experience . We hope that this feature improves developers’ interaction with the documentation. We recently had the opportunity to work with […]
Continue ReadingjQuery Docs Keyboard Navigation- Tagged in:
- tutorial,
- web applications
- Jan 14 2010
Wild Card Sub Domains
After a recent foreign top level domain registration binge aimed at some fun domain hacks, I got sick of spending money on foreign TLDs, and started getting creative with subdomain hacks. TLD hacks are fun, but feel a little less natural to me, and certainly don’t tend to read as well; my eyes tend to stop at […]
Continue ReadingWild Card Sub Domains - Jan 09 2010
Code Repository Analysis
Ever wonder how many files or lines of code are sitting in your project? Hop on the command line and run the following find commands in your bash Find the number of files in the current directory (runs recursively down into all subdirectories): find . | wc -l Find how many lines of code are […]
Continue ReadingCode Repository Analysis- Tagged in:
- tools and workflow,
- web applications