Solar panel/mirror ray-tracing model

(Andy Wootton) #1

I’ve finally found something I really want to do for my first coding project and as I may discover I don’t know how to do it, I thought I’d announce it here to give some context to any weird questions I might ask over the coming weeks.

I got interested in solar power generation after hearing a talk by a graduate student about his investigation of large scale concentrated solar generation. I subsequent failed to get anyone interested in some ideas I had. I plan to build a simple model to see if my idea can improve yield. I think the same idea might work for solar panels at domestic scale, so I can imagine that a viable commercial modelling service could be attractive.

A couple of people at Brum Functional Programming group think it should be viable in FP so I’m going to try in Clojure first but I have Python as my fall-back position. I’ve never designed any non-trivial algorithms in Lisp-type languages before, so it could be ‘interesting’. I’ve also done zero graphics coding because graphics was expensive when I last wrote code, so I’m unfamilar with the algorithms I’ll need. I’m not doing a front end yet because I can’t imagine what it might look like yet. I’ve signed up for the 5 week Webbish course at B&MI so maybe I’ll be ready by then?

There is quite a bit of Free software around solar, because hipsters, but I’d rather start from scratch before being influenced by someone else’s design that doesn’t port well to FP. I have much to learn.

(Andy Wootton) #2

First realisation: I haven’t written any user-stories. I’m one of those nightmare customers who jumps straight to solution aren’t I?

Second realisation: my real user-stories are about getting certain types of experience, rather than the product I’m building. It doesn’t actually matter if it fails. That’s a business benefit that a business wouldn’t normally admit to.

I should probably git this once I start and I have no idea how to use git with Clojure.

(Andy Wootton) #3

I have a confession: I’ve been a bad Leanist. As I was fighting the brambles in the freezing cold this morning, I saw that I had been led away from the Agile Way by my interest in learning a software tool.

My question is about the physical world. I’m a lapsed physicist. I need an order of magnitude calculation and it would be much quicker to do that with a torch and some model solar panels made of graph paper. What was the least I could have done to test my hypothesis and fail quickly?

Obviously I might do it anyway because I’m a software nerd at heart but if this had been a business problem, I’d have had to pay for this work out of my training budget and given a refund to the customer, if I’d lost my bet. I hope I’ve learned something.

(Jon) #4

I don’t know much about this area but:

  • I wouldn’t bother with user stories until you have played with some technology - spend a day or two getting a rough demo working first. No point in having a shiny requirements doc if you find that you will have to change it anyway.
  • I’d set choices about a language (e.g. Clojure) or a style (functional) as a lower priority that what languages are generally used in this domain. Find a popular ray-tracing library first and then see what language bindings are available - choose one with an active community.
  • Do you need ray-tracing in the graphics sense here? If you are looking to show that a particular approach will yield greater solar energy at the panel then maybe this is a maths/physics problem, in which case Matlab or (so I hear) R.

(Andy Wootton) #5

@halfer My comment about user-stories was slightly tongue in cheek but I don’t think writing down what you are trying to do is ever a bad idea, just to check if you know. I’m hoping this will be my first try at treating software development as computational science, so stage 1 is to design the experiment but I see that as iterative too, so very lightweight.

My main objective is to learn Clojure (/Python), so it doesn’t matter if it’s the best language for the job. I am interested in the question but as I said, there are much easier ways to crack that nut.

It is ray-tracing in the optical model sense. There don’t need to be any actual graphics. I think the answer could be a count of the 1s in a binary matrix but that’s design and I try not to put design decisions in my user-stories.

BTW I introduced Agile in my last job mainly to get away from wasting my time on shiny requirements documents.

(Andy Wootton) #6

I’m trying to decide if writing a user-story, which is sometimes said to be a reminder to have a conversation later, is still valid when the conversation is with yourself. In my case, I think it probably is. :slightly_smiling: