A few successes later

In what has been a very good week, I’m happy to say that I have some successes.

First, I got to play around with the programming language Julia.  This is part of the ongoing work I’m doing with 7 More languages in 7 weeks.  Julia is a nifty little language that excels in technical computing.  It was real simple to pick up the basics, and I could see where math-heavy programs can utilize it.  The examples head you playing with multi-dimensional arrays and transforming them.  Had I remembered any linear algebra, I could see why this would be so attractive.    I’m interested in seeing what’s next in this language.

Second, I made some good success on Project Euler.  I was working on problem # 100 (hooray a round number), which involved probabilities (blech).  I don’t want to give away too many secrets, but I went about it all wrong to begin with.  My Clojure Program took at least 4 days to run, but I was happy to get a right answer after that.  I’ve done some problems that ran for days, only to be wrong.  I knew that the code I was running was fast, but the problem was I was just checking too many numbers.  My problem domain was too large.  More often than not, its an algorithmic optimization that buys you the most, not the small stuff (which is a very tough thing to convince when working with embedded engineers used to optimizing assembly).  I was able to see a much faster solution after I solved the problem, and I can tell you that it only had to make 8 or 9 iterations of a computation, rather than a couple hundred billion.

Lastly, I’m happy to say that I got my elixir starter bot for Warlight2 interfacing with the server : https://github.com/pviafore/warlight2-starter-bot-elixir.  I sent if off to the ai games to try and get elixir installed as a supported language on their systems, so time will tell if that works or not.  I liked this project so far in Elixir, because the whole actor model makes it very, very easy to keep things isolated, which makes testability a snap.   I want to get better at Elixir macros, so that I can better understand metaprogramming, and I’m hoping my next few iterations will do just that.

I really need to update more often

I was browsing Hacker News the other day and came across a post that said (paraphrased): if you want to do something well, learn to do it fast.  The whole idea is that the faster you get at something (like writing a blog post) the more inclined you are to do it; there are no obstacles in your way.

I need to write more blog posts, not for anyone else, but just for me to get used to writing.  I think its a great way to express my thoughts, even if not a single soul reads these.  I could keep a diary/journal, but I figure making something public helps out if anybody ever comes across a similar problem than me.

I have not worked on HAPP for quite some time, I just have lost motivation.  I see the blue blinky light of my microphone that I bought, just taunting me.  I will get back to it, but my issue right now is that I want to clean up the code (it was written during a hack-a-thon after all), and I just have to get over that hump.

So instead, I’m going to talk about some side projects I’m looking at.

I try to do problems on Project Euler whenever I have some downtime (http://projecteuler.net), at least when they aren’t hacked.  I have used Project Euler to learn new languages (I learned a bit about python this way, especially lambda functions).  However, for the past 20 problems or so, I’ve been attempting Clojure.  I played with Lisp in college, and a little Clojure going through 7 languages in 7 weeks ( a book I highly recommend).  However, I just worked on the Su Doku solver in Clojure, and feel like I hit a real turning point.   I’m still doing basic stuff, but I am reasoning a lot better as a functional programmer.  (I’m really appreciating pipelines)

I’m a C++/Python developer at my day job, so learning a new language is always fun.  I truly believe the Pragmatic Programmer’s advice in that a new language should be learned every year.   Learning Python made me a much better C++ programmer (I learned to be expressive and simple), and learning Clojure has made me a better Python programmer (limit shared state, think in functions) This year for me is Clojure, although I plan on picking up Elixir towards the end of this year (more on that later).  When learning a new language, always have a project in mind, otherwise, you have no reason to continue on.

At work, we are starting an AI challenge during our lunch hour.   We picked Warlight 2 as our engine.  We’re going to develop the bots on our own, but then share our strategies each week and pit them against each other.  I’m going to be coding in Elixir, so step 1.  Learn Elixir.  I plan on open-sourcing all my work, and hopefully contributing an Elixir starter bot towards the end, so we’ll see how that goes.  I hope to keep this blog updated with that information.

Books I’m currently reading:

7 More Languages in 7 Weeks – I can’t say enough good things about the 7 in 7 series.  At first I thought they were gimmicky when seeing them on the bookshelf (like the teach yourself C++ in 21 days), but boy was I wrong.  I’m not great at the exercises, but I’m hopeful that after my Elixir chapter, I can start posting up code here.  Maybe it will help some people reason about what they are going through.

Your Code as a Crime Scene – A while back, a post by Evan Miller caught my eye.  It was about the growing field of software science.  Working on a large codebase (35,000 files and growing), I was interested to delve a bit more into this field.  This book has gotten me thinking about a new way of analyzing software for faults, and I’m excited to try it out at work

The future of the mind – This is a book by Michio Kaku that is just detailing all the cool stuff about your brain.  It’s one of those fun, pick-up and read a few pages, books.

Upcoming Books

Continuous Delivery – for a book club for work.  I like the idea of continuous delivery, and am interested in how we can apply to that to legacy embedded systems

Building Microservices – Buzzword, buzzword buzzword!.  I kid, I kid.  In all seriousness, I want to get a good grasp of what some of the benefits/pitfalls of distributed systems.

Web Development Recipes – I was never very good at web programming, but I’m getting into it more and more each day, so I’d like to know some of the more modern tools/practices out there.

Programming Elixir – I’m really excited about this one, as this is my next language-to-learn.

That’s it for today, Next time I hope to share a bit more meat about what I’m doing.