Monday, April 14, 2014

The old is new again

So far so good with my new self-scheduling.  My buddy was more than happy to take over my "yell at myself" role.  But I think what may have been most helpful was just creating a calendar for myself with mile-stones.  It feels a little more manageable than a long list of Trello tasks and it will be much more apparent when I'm slipping.

On a different note, c++ has come a long way since I used it in college.  I'm currently re-writing my level solver with it to hopefully get the performance I need to check optimal level solutions (due date Wed).  Since my level solver relies on a large hash table of level states, I was doing a bit of research on hash functions.  And I was surprised to learn that there's still improvements being made on this very basic area of computer science: non-cryptographic hashing.  I eventually settled on something called SpookyHash (http://burtleburtle.net/bob/hash/spooky.html).  No idea how it works under the hood, but apparently it's reeeeaaally fast.

Another thing I had to re-learn is memory management.  C# and lua both use garbage collection so the developer doesn't need to worry too much about allocating deleting objects.  Even Objective C has auto reference counting now (ARC) which makes things a lot simpler.  Well apparently the latest version of C++ has something called a "smart pointer."  It frees the developer from worrying about deleting objects the same way objective c does it: through reference counting.  I think the latest c++ even has lambda expressions.  Suddenly it's not looking like such a dated language anymore.

No comments:

Post a Comment