Programming Languages and Art

I was recently translating a very old piece of code written in the ’80s in FORTRAN77 to Matlab. This process has taken me 3 weeks for 20 line code!

Partly because probably I am not a skilled programmer and partly because statements like GOTO do not exist in Matlab.

My aim was to work out exactly the efficiency of a numerical algorithm so I needed to know exactly the value of each variable at every loop counter etc. so the code had to be transcribed exactly. No fancy coding skills to improve the “code” were to be invoked.

In this exercise I realised that programming is more an art form than anything else. There is a beautiful flow of logic (actual mathematical algorithm)  that has to be channeled (dictated by the language constructs, data structures and commands) into a specific form (much like a canal I suppose).

Each time we choose a different language, expressing the same algorithm can take a very different form. Interestingly the language itself can impose either an improvement or a the opposite. In some ways the language can function like the clothes we force our bodies into- giving a specific shape.

In some cases its bit a like struggling to find a word in a language where it doesn’t exist  to express a sentiment that we have a word for in another language.

I wonder if anyone has studied how programming language constraints influence actual logic/algorithms?

Or is this simply my own lack of expertise leading me to fanciful thoughts?

Advertisements

Of PhD theses

Some years ago I was writing my PhD thesis and today my student is writing his. Not only that I’m at this point examining the PhD theses of students from other universities.

What a big change it is from being a candidate  to being a supervisor or examiner!

All these three things are related and yet completely different.

"My doctoral thesis looks like a fake? Scandalous! I'll have a word with the bloke I bought it from!"

Cartoon on PhD thesis

 

As a student my worries were about trying to finish on time, producing something that my supervisor would find acceptable and then stressing about the viva-voce. I did not realise it at the time but a lot of the responsibility for successful completion of the PhD lay with my supervisor. I would often give him my results or work and then rest easy that his judgement would be sufficient. It did not occur to me at that time that it would’ve placed a certain burden on him, all that his judgement (given that all judgements are subjective) not be in agreement with that of  reviewers of a paper or a PhD examiner.

Those were the days of mental freedom and relative lack of worry.

As a supervisor suddenly the table has turned!

Now it’s my job to make sure that My PhD student’s thesis meets certain standards. So now I spend hours reading draft after draft, giving extensive and detailed comments on how to improve the chapter that I’m reading. Additionally I stress about preparing the student for their viva examination or thesis defence: Will they be able to answer the questions ask ed by the examiner? Is their knowledge of the literature and state-of-the-art sufficient? Is their command of the basic concepts sufficiently strong? Will they be able to control their nervousness?

In some ways you could say this experience is more nerve wracking than that of being a PhD student.

And when I think about being an examiner this is an entirely different ballgame.

Now from the piece of work in front of you (a thesis) one has to make a decision whether the work presented is of the standard expected for a PhD: the results and/or techniques presented amount to a novel and significant contribution to the scientific community. It is no longer about just judging the excellence after work. One has to read the thesis to see whether the basics are presented insufficient detail (including for example a literature survey) that convinces one as an examiner that the student understands the basics and has sufficient scientific knowledge of the field. In the final defence one would also have to ascertain the degree of independence the student has displayed in completing the work.

On one hand are the quality considerations (that as an examiner you judge whether the University regulations for the award of the degree are being met). On the other hand are people considerations. How do you discount for the nervousness of the student? How well can you really judge whether the student has led the work or it’s been led by the supervisor? If unfortunately the student doesn’t answer questions as well as one would like, does it mean the student doesn’t deserve a PhD (given the body of work presented in the thesis)? You realise that it is someone’s career at stake and your judgement has a huge impact on then.

It is a huge responsibility.

There is also the matter of your own personal reputation. Are you being fair, objective and technically sound in your judgement? Even if you have been all of these things are you been perceived in this way? If a situation arises with the student have you handled it in the best possible way that satisfies the regulations and is humane and considerate?

I always thought it was easy to sit in the chair of the examiner. I am now finding that it is perhaps the most difficult position to be in.

If you have any thoughts do let me know.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Bio-inspiration and Science

I came across this article about bio-inspired design in medicine and it resonated so much with me that I wanted to blog about it.

You can read the article here.

I particularly enjoyed the discussion that bio-inspiration and bio-mimicry can be useful but should not be followed blindly or thought to give answers to any and every problem.

The designs evolved in nature over millennia come about through constraints, and are therefore related to those constraints.  If the (design) problems we aim to solve have similar constraints then the bio design is a great template to explore.

It was inspirational also to read the personal story and journey of Jefrrey Karp and how he followed his intuition and design idea from a concept to a finished product!

I hope you enjoy the article as much as I did.

Thermodynamics and Photonics: a match made in California

Some of the best Science is that of sinple, elegant and seemingly outrageous ideas: the sort that relate to the basics of Physics.

At a recent plenary talk at Photon16 by Professor Shanhui Fan this is exactly what we got to see and hear. The idea of solar cells converting illumination (or what Shanhui calls positive illumiunation) into current is not new.

However he went a step further: negative illumination!

When a cell is dark, and if its temperature is higher than the ambient it must give away the excess energy to maintain thermodynamic equilibrium. Presto- current in the opposite direction compared to the daylight!

Ergo a cell that can generate electrical power in the day and the night!

To me this concept is beuatiful because it uses some fundamental and very simple Physics.

This sort of thinking that focuses not on technological aspects or narrow single disciplines alone but rather sees Science/Physics as a whole is what challenges status quo and leads to exciting new discoveries!

 

Optics and exhibitions

Recently I visited two exhibitions and both have completely blown my mind.

The first was the Cosmonauts exhibition at the science museum in London  and the second was the Phillips collection where I  had the opportunity to see the Paul Allen

WP_20160115_21_00_31_Pro

Poster from the Cosmonauts exhibition

collection in  Washington DC.

So about Cosmonauts first:  the exhibition tells the story of Soviet Russia’s foray into space and how it put the first man-made objects, landed them on other planets and launch the first man into space.  Imagine seeing the space suit worn by Valentina Tereshkova the first woman in space!  It was a stunning experience as well as a very moving one.

There was a letter there from a young girl who asked the soviet space agency to send her to the moon because she had the appropriate fur coat and boots!  She said that she was willing to die but would they please please send her!

This passion for space and exploration is not new and the exhibition showed the excitement generated the world over when  when the Gagarin went into space.

WP_20160115_20_57_22_Pro

Poster from the Cosmonauts exhibition

What does this have to do with optics?

Well if you’ve seen the new photographs from Pluto they completely break apart the theories that we have about planets.  How can a planet that is not in geologically active have mountains?

The roll that optics has to play in all this is  is opening our eyes to new wavelengths-  enabling us to observe the world in frequencies that we haven’t been able to do so before  as effectively as we can now.  With the new sources and detectors in the IR and far IR we should be able to detect signs of life potentially!

So with optics to the stars then!  And this time we can possibly travel there too.

And now about the Paul Allen collection: at the OSA  winter leadership meeting there was a reception held at the Phillips collection,  and I’ll gallery in D.C.  The Paul Allen collection on landscape painting with charted how landscape painting has changed over 400 hundred years was being shown.

The sumptuous  collection of Monets, Manets, Signacs, even a Matisse and Kandinsky, a surreal Magritte were simply fabulous! Unfortunately i could not take photographs of these and post them here.

Optics took me to DC and it was optics that give me the opportunity to see these masterpieces.  Not to mention that there was the visual optical process of actually looking at these paintings.

Overall I would say optics is a win-win! I had a fabulous time and I hope you can  experience what Art other sciences bring in conjunction with optics in to our lives.

 

Optical illusions, lighting and art

I had a great time yesterday visiting Chain Reaction,a  show at the Kircaldy’s Testing Museum.

The show brought together engineers and artists to put together an interactive display. By clever lighting and use of their signature technique which blends music, light, sound etc. a sense of movement with which the observor could interact was created.

There were exhibits for example, of a swinging chain. When the observor puts her/his hand in a metal ring (breaking the LED light beam that a sensor can sense) the lighting stops so the chain seems to stop swinging. Similarly falling blocks that break, can be stopped or seemingly frozen in mid air by breaking the light path between an LED source and sensor. the accompanying music that mimics the sounds of things falling and shattering (in the case of the blocks) or the swinging chain make the effects very realistic. You actually feel there is a chain swinging towards you!

It challenges perception and the technique of creating such an exhibit is quite exciting. I won’t spoil the fun, look it up at the Trope website!

Art, light and the Serpentine

Every year since 2000 the Serpentine Galleries host a summer pavilion by celebrated architects who have not worked/displayed in UK before. Serpentine Pavilions a pictorial history

This free to the public event is immensely and is a terrific way to see some high quality design and interplay of ideas that bring together architecture, design, art, science.

The 2015 pavilion by the Spanish practice, Selgasgno, have created a colourful pavilion using Fluorine coated polymer which seems to have an iridescent colour and appearance. These effects are obviously interferance as opposed to structural colour  related. Unfortunately the pavilion wasn’t open beyond 6pm for me to see how the effect changes when the lighting is not so bright, or is Sodium lighting. To me the whole thing felt a bit like a low budget sci-fi movie set so I was a bit disappointed.

Iridescent colour of the polymer film

Though the pavilion tries to explore in the words of Selgacgno “public to experience architecture through simple elements: structure, light, transparency, shadows, lightness, form, sensitivity, change, surprise, colour and materials”, it seemed like the understanding of light is still somewhat non technical.

What technical understanding of light would bring and how, I am unable to say. But I do know that it would be lovely to see it being used to being about a true melding of art, design and the Science of light.

Nonetheless I enjoyed my visit and this series of new summer pavilion each year is something very much worth visiting!

Farewell the Scientist President of India

It was with great sadness that I read the news of Dr. APJ Abdul Kalaam’s death. Dr. Kalam, a brilliant scientist, a fabulous president for India and a great man.

He was immensely popular among the people of India and hugely respected. As a scientist he rose to prominence with his successful heading of the Indian civilian space and missile programme. This programme has been a source of great pride to people: a clear indicator of the scientific and technological progress that the nation has made.

Dr. Kalam’s appointment as the President of India was like a breath of fresh air: a president who was not a politician, someone the average person could look up to. His emphasis on development and growth  reflected his forward thinking and scientific mind.

If only there were more like him. You will be missed Dr. Kalam but your legacy will live on.

By artiagrawal Posted in opinion

Status quo

The thing about the status quo in Science is that it never lasts very long. Depending on what time horizon you employ the Science we know and take as the writ of nature, changes. We discover new things that contradict or modify our understanding. It is both disquieting and exciting.

The discovery of Pluto’s mountains and relatively crater free plains with their polygonal shapes is one such. Where we thought that only large planets with active cores could show volcanic activity we are now seeing some as yet not understood mechanism that may make small icy worlds like Pluto geologically active.

Seeing those first few images of Pluto has been a revelation to scientists and amateurs alike. Imagine that sitting here about 4 billion miles away we are speculating what makes the mountains on Pluto!

What we learn may change our concept of our solar system and planet formation yet again, but each step seems filled with breathtaking excitement.

Just yesterday I saw a TV documentary discussing in scientific detail how a manned mission to Mars would operate. Perhaps when we land there (or even Jupiter or Saturn in some years!) we’ll find something that makes our world tilt yet again.

This applies of course to the very small as well as to the very large.

The discovery of the pentaquark has been a little overshadowed by Pluto’s shenanigans. But is no less cool. Will the LHC confirm the supersymmetry view of the world or do we go back to the drawing board?

To have a week like this, filled with such exciting discoveries with potential for taking our thinking in new directions, is one to savour. I just want more photos from Pluto!!

Repeat, repeat, repeat

Today while I was reading up articles on solar cells I came across something that touched a real chord with me:

In the September 2014 issue of Nature Photonics, Zimmermann et al. had a commentary piece titled “Erroneous efficiency reports harm organic solar cell research” on page 669.

The authors commented that mischaracterization or solar cell power conversion efficiencies and inconsistent data being published in scientific journals (in the field of solar cells) was particularly harmful for the area. The race for getting the best results and publishing them in the journals with highest impact factor, has in part led to people being less careful about incorrect measurements and poor reporting.

The danger when such articles multiply and proliferate is that the data being reported is unreliable and one doesn’t know which data/papers to trust. The progress of the field as a whole is hampered.

Having data and results that can be trusted, repeated and verified is a must for scientific research. In some cases, the methods to be used for characterization are clearly laid out and researchers can follow these, and/or conduct standardized tests/measurements to show the veracity of their results. This instills confidence in readers about the work and should positively impact the citation of the work too.

Obviously such issues are not confined to one field alone. For numerical modeling as I have said in previous posts, benchmarking results of a new technique against existing test cases/analytical solutions is a must!

The sheer number of the papers that were reporting results which overestimated performance though was quite a shock!

I think from now on I am going to be even more rigorous about my results as well as those of the papers I review/edit!