Friday 9 November 2012

Random Little Observations Early Nov 2012


I have a whole load of little observations about stuff I have been doing over the past week. So settle in with a cup of coffee and read on for what in the most part will be quite a positive set of observations. Of course included in this is a little update to what I have been up to.

First up C++. I program in C++ for my day job, it is what pays the bills. I quite like C++ but find development in it a little slow in terms of knocking out code for stuff at home. The small stuff I knock up at home does't need the speed of C++ making it hard to justify extra time spent creating programs. However I have recently been messing with C++ 11 or what ever it is now called. 

It is quite an improvement. A combination of lambda, improved initiliser lists, improved constructors, for range loops and of course auto being repurposed in an intelligent way will really add to the productivity of programmers. The are lots of other improvements many aimed at library developers and my work happily straddles application and library development. Overall a win but the thing at the back of my mind is the language has just gotten a fair bit bigger. I am not a super fan of large languages but I guess to improve C++ it has to grow or break things. 

I hope someone is working on "C++ the good parts" to give new programmers a clear path.

Much of my coding at home is currently done in JavaScript see previous posts about this. I am using emacs as my IDE. Learning emacs is a journey in itself and one that I am only a short way along. Over the past week I suddenly find myself using find and replace a lot more. Yes every editor has this but most pop up a dialog. Emacs does not do this and as it is less distracting meaning I use it more as I dont neet to reach for the mouse. I am also starting to feel the urge to do some emacs lisp coding to gain a few features I would like and probably already exist if I could find them.

My JavaScript skills are also increasing. I am still learning stuff but my mental model of how it all glues together seem to be getting closer to what is actually happening. That is I am updating it less and less so I assume I am getting closer. Obviously I don't know what I don't know... I can now correctly predict when the this variable is going to be wrong.

Much of my coding has been working on a little web based sprite editor. It is not much to look at but I quite like developing it at the moment. It is probably about 350 lines of code but those lines have been iterated over quite a few times and I keep doing so as I learn more.

One interestng thing is I usually find with dynamic languages is at somewhere between 500 and 1000 lines of code the code base starts to feel heavy. I suspect this is my inexperience with the language so it will be interesting to see how the code feels once I hit those heady heights! 

I am hoping a better understanding of JavaScript and focus on writing as good quality and idomatic code as possible should help avoid this. People certainly manage to create large application in JavaScript so any failing should be directed at my process rather than JavaScripts.

Anyway the sprite editor is starting to actually function at a very basic level. I have three fairly large things I want to add then it is possible I will put it up somewhere for people to see. No promises as this is just a fun hack at the moment.

No comments:

Post a Comment