Sunday, July 17, 2011

A Cookie, A Monkey, And A Linked List


Blender Addons has a ways to prove itself. Five add-ons is a good start but there's still much to do. Here's what's been happening.

Particle Tracer
Particle Tracer is an add-on I wrote that uses particle locations to create curves. The order and/or chaos in the end result reflects the intention or degree of skill the user has when configuring a particle system. It's a good script for creating simple curves that look like flailing noodles or something fancier if that's what's desired.

JMonkey Investigation
JMonkey is a compromise. When I code unpaid and open source, it's computer graphics and Python and PHP are the right fit for what I do.  However, I'm also looking for paid work.  When tech recruiters say they want Java and .NET, they mean it.  The idea of accepting programmers from other languages doesn't fly. Since JMonkey is both Java-based and generally known and respected in the open source graphics community, I went with it.

My first impression is it's good. You can get a Netbeans based environment with all the libraries you need to start. The “Hello World” it gives you for a default project comes with a 3D cube you can interact with. Judging by the demo videos, it has a lot of good capabilities. There might be future projects in this.

Linked List Challenge
A famous interview question asks “How would you write a function to iterate backwards through a singly linked list in C?”. Most interviewees from entry-level to kernel hackers get it wrong and get eliminated for it. I wonder if they should.

The first thing I take issue with is the candidate is asked to do it in C. Most people's programming background is pretty high-level which would make C seem pretty intimidating.  Candidates should be focused on the problem without being distracted by the syntax of the language and C often makes that task needlessly more difficult.  Candidates should be allowed to use either pseudo-code or their comfort language to tackle these sorts of questions.

I wrote a Python function to solve the problem in 10 minutes which brings up the second issue I have with it. It's easy to solve the problem if you can think recursively. Recursive thinking comes easy if you do a lot of functional programming.  I use that kind of thinking frequently in the Python and Javascript code I write.  

However, I suspect most good enterprise and business developers manage just fine without functional or recursive thinking in their daily work.  It doesn't apply in every situation.  Most of the time, it doesn't even apply in the context of the job the candidate is interviewing for.

Cookie Setting in Uncle Squirrely
I decided I wanted Uncle Squirrely to remember what game ordering and platform they were last on when they left the app and came back later. It was a good excuse to get into cookies.

I had the cookie setting happen on the server side. I let a JQuery plugin handle the job of reading cookies and turning the data into a GET request. This meant the server-side didn't have to worry about how the data was coming in. It was a pretty simple yet interesting experiment overall.

And That's It
Another satisfying week done. I'm looking forward to the next one and you'll hear from me again soon. Cheers to all.

No comments:

Post a Comment