Tuesday, September 22, 2009

Some night's just don't go well

I was looking forward to a good evening's programming. I was dreaming about this bit of code last night, so I think I've already written it once (in my head at least).

However, no coding has happened so far.
  • Initially, I was looking up .pyc run problems. No problem - we will use .py.
  • Tried LWC2 ... no weather station = quit. Stu pointed me in the right direction.
  • The build Stu sent doesn't have a key component - or I'm going mad. Probably the latter.
  • Whilst this was happening I needed to move the directory structure around for the importer - which involved subversion. Somehow, against all odds, I've messed it up. How? No idea - I use subversion a lot. I think the simplest solution is backing up the directory then restoring from hourly backup (Thank you Time Machine).
Anyhow, if I don't stop blogging (I needed to vent), I won't get anything done this evening.

Tuesday, August 25, 2009

Grand Central Dispatch

The main topic of discussion today between myself and Stu is a new Snow Leopard Mac OS X 10.6 technology called Grand Central Dispatch. The technical brief gives an interesting glimpse, with enough information to get you excited but not enough actually tell you what you need to know to write program.

Of all the features of the new operating system this feature, I think, will be the most discussed by geeky programmers this week. Sure OpenCL is nice, but we've talked about that. More 64-bit is wonderful. Accessibility is cool. But for programmers, multi-threading is a pain that needs sorting out, preferably before the next generation of multi-core chips arrive.

I know there are many solutions and others (Microsoft, Sun...) are producing 'new' solutions. It's an interesting thing to watch and be able to play with. Pity Snow Leopard is Intel only ... maybe a reason to upgrade. Where are those low power quad core laptop chips?

Friday, August 21, 2009

Monochrome Monitors

Whilst I'm not sure I've seen any scientific evidence that monochrome monitors, like amber or green, help with eye strain versus a modern colour monitor, they did tend to be sharper than the same generation/similar cost versions of CRT colour monitors. Today's colour LCD monitors are pretty good for sharpness, of course, so it's less of an issue. And people do love colour - take syntax highlighting in text editors for code.

However, I think there is something special and 'cool' about those old monochrome displays. And I'm sure that's recognised today in a certain class of application. Take for instance the MacOSX Terminal application that has several colour sets built-in, including a pretty class green terminal one, and it allows you to set your own colours. In fact, nearly all command line interfaces, serial and Telnet terminal applications allow you to set colours - and apart from a very few specific instances, these are monochrome applications.

I'm currently making a couple of command line applications and my current command window? Full screen, black background and wonderful amber text. Ahh, bask in that orange glow. More productive? I think so, even if the effect is due to some happiness factor.

And if the happiness fades? Well, there's always green text...

Saturday, June 27, 2009

Micromouse 2009

A good day with a bunch of schools competing and some really good runs in the maze solvers and time trails.

Thursday, May 21, 2009

Index Zero

This is a copy of my post in reply to this comment about Tony's hate of starting the use of C arrays at '1':
http://greenstripe.blogspot.com/2009/05/i-recently-read-design-document-which.html

I think you know this, but you are confusing counting the number of something (to find the number in the set) with enumerating each item, thereby giving each one a numerical reference. For enumeration, there is no particular reason why the first reference has to be '0' or '1' or any other number - or in fact a number at all ... think Javascript arrays where the index is a string - this associative array is like a c++ map.

I'm not convinced that losing the memory for element 0 is, in most systems, critical. Except perhaps where you have constructors / destructors - then you are running code on element zero.

However, I do think there is a deeper problem in C with using 1 as the first element 'because it's seen by the user therefore the conceptual gap between problem domain and solution domain is smaller'. The first that comes to mind is that (a) the user display is tied to this ascending number sequence. We don't, I believe, naturally think of things as numbers - or named as numbered. Therefore there is a lost of abstraction that really could do with being hidden. Objects (e.g. with a C++ class) could sort this. Secondly, or (b), in C, at least, where I've seen this, there tend to be -1 and +1 sprinkled randomly around the code (without the help of object oriented design). Thirdly, or (c), (what do you mean I've run out of enumerations?!) if you have to remove an element or make the list bigger in the middle, or do any sorting, then the index (which is what we are talking about) becomes invalid. But the user numbering, apparently, does not. Doesn't that mean that the whole 'fixed sequence' is an artificial construct of the specifier or developer? Where does this leave the user?

I'm sure there are more ...

One last thing: I can hear a bunch of programmers saying "but on small systems"/"my system" it's the most efficient way of showing something. But that's not the argument here. Either: (a) you bit the bullet and go for efficiency and ignore usability or (b) you abstract the user from the internals of the program but make the internal of the program easy to maintain. The third option making it easy by removing abstraction only works in very narrow cases and tends to be fragile to change.

Reply about Zuma and World of Goo

In reply to Tony's blog post: http://greenstripe.blogspot.com/2009/05/computer-games.html

Zuma: I think PopCap is a very interesting company who've been able to capture the puzzle game market by good sales, contacts and marketing. But their games do have annoyingly good but simple game play. Zuma, specifically, is a fast paced arcade game, and as such increases excitement and fun factor (and probably adrenaline - think roller coaster). I wouldn't find them satisfying all the time - but occasionally a game without much plot or exploring is a good change. It's sweet vs. savoury of games.

World of Goo has entrancing graphics, fantastic sound and music and a good game. However, the game play is, mostly, not timed giving a much gentler game. The game also is interesting for a 'explore physics point of view' but is it really better game play? I certainly appreciate the quality, polished 'production' and independent game developers. But do these actually make a better game?

Footnote regarding World of Goo: Additionally, as a programmer, I'm really irritated by how good the graphics and music are. But that's just jealousy.

Sunday, May 17, 2009

Encryption, Linux, Programming

Been creating encrypted disk images on the USB key I carry around. I released I had various projects (not all mine) and personal data that wasn't protected. Created encrypted disk images - cross platform ... so it should at least slow people down :-) The thing with disk images is that you don't need to do a seperate encrypt/decrypt cycle, like you do with something like GPG.

I also really want to play properly with an up-to-date Linux. My main machine is a PowerPC box and I do have recent Ubuntu for PowerPC - but really want to run both in parallel. Projects like Mac-on-mac and Mac-on-Linux are pretty much dead. At some point I'll have an Intel Mac - which will make things like VirtualBox/Parallels and VMWare Fusion options. I was looking at things like Thinkpads on ebay and they aren't terribly expensive - certainly cheaper than buying a new netbook - although less portable (X-series maybe excepted). One of my mates has an old ThinkPad ... so that might allow me to run both in parallel at my desk. (He also has an old Tower - but I'm trying to give up non-portable computers for size, storage and portability reasons.) Another mate has just offered my my original Tangerine iBook back. That would be interesting but it's only a 300MHz G3. I wonder which model ThinkPad it is.

I also have been pretty slow at my two programming projects - the importer and the robot. Hopefully I'll get some actual serious work done over the next week. Need to finish the importer so I can get onto the next project that I'm desperate to start!

Saturday, May 02, 2009

Subversion finder scripts

Came across these, referenced from macosxhints.com

http://svn-finder.sourceforge.net/

Looks interesting but haven't tried it yet.

Sunday, April 19, 2009

MINOS 09 - Saturday Late Afternoon

Garry Bulmer - Kids doing electronics, Embedded Control, Robotics. Existing schools kits, hand outs, breadboards, class PCs. Arduino development board. Various projects around these - including line follower robot.

Ken Hewitt - Overview of the Parallax Propeller Chip

Alan Dibley - More diagonal paths.

Saturday, April 18, 2009

MINOS 09 - Saturday Early Afternoon

Martin Barratt - IR-based wall sensing circuits, technical considerations and choice in detail

Martyn Pittuck - Adaptive Control - Mouse overview, and technical overview of details. Sensor FFT. Applying adaptive control to skidding, predictive to next turn. Generating trajectories using Bezier curves. Estimating friction. Controller operation and cornering offset and exit angles.

David Hannaford & Pete Harrison - Flood Algorithms & Route Planning - Discussion of the basic principles of flood algorithms and possible visited cell optimization. Methods of finding diagonal paths. Asynchronous flooding by Alan Dibley.
Newer›  ‹Older