Tutorial

Searching...

I thought I was pretty good at finding information using Google and other search engines, but after the recent Mathematica seminar I went to I realise that actually I could be searching smarter using Google.

For example, all of the Mathematica documentation sits on one site reference.wolfram.com and I could trawl this if I wanted, or even add the domain into the search field to help give it some focus, maybe even break out some simple BOOLEAN algebra to proper show off.... or I could read how to use Google properly and just constrain all of my search results to this site using site:

For example, entering the following into Google searches the reference.wolfram.com site (and only that site) for the word Transpose.

site:reference.wolfram.com Transpose

Now to take it a step further I could limit all of the responses to be PDF files incase they are tutorials that would be helpful.

site:reference.wolfram.com Transpose filetype:pdf

Give it a whirl on whatever sites you frequently search.

General

Speed...

I'd never really given speed a lot of thought when coding my Mathematica notebooks, but after recently attending a seminar I think it's something I need to spend some time thinking about.  My sheets are normally fairly trivial in comparison to some of the large banking house notebooks that run, but what I was interested to hear was that some of the sheets being run take over 6 hours from the other delegates.  That's a long time to wait to see if your numbers are rubbish.

Also what was interesting was that the presenter spends a lot of his time making other people's code work faster, essentially that's the core of his consultancy business.  Some speed improvements were up to 912% faster.

So a 6 hour sheets would potentially run in less than 30 seconds.  Which is a hell of a lot faster and lets you run various scenarios in a day rather than one a day.

One simple thing that I took away from all of this is if I'm only interested in numerical results rather than symbolic, then I need to think carefully about the level of precision I require.

For example using the /AbsoluteTiming flag you can do a simple test to see the difference that the level of precision makes.  By simply adding a decimal point to the number 2 it will convert to machine level precision.

Gives a timing of 0.283438 seconds on my machine.  Simply adding a decimal place to the number 2 gives a significant speed jump.

Gives a timing of 0.000293 seconds, which is a massive shift in computation time.

Something to consider.

Tutorial

Rotations...

In a previous post I showed how complex numbers are useful when rotating co-ordinates and since then I've hard coded several geometrical translation and rotation routines that have been crude, but functional in Mathematica.  Nothing too complex, but a nice little achievement, working with matrices and manipulations.

But the scary thing about a big program like Mathematica, is that it has lots of built in functions that whilst incredibly well documented, you have to be aware that they exist before you can start to search for them.

The transformation matrices scripted above, can be automated using some of the inbuilt functions in Mathematica 9.  So for example if I wanted to rotate some co-ordinates about the z-axis the syntax is quite straightforward and can be taken from the documentation.  Rotating 4 co-ordinates (a) around the z axis (b) to give the newly updated co-ordinates (c).

There are quite a few neat and compact examples over on the documentation website if you're interested.

I personally struggle with Mathematica at times, not because the documentation is poor, but because the scope is so vast.  But with helpful sites such as Stack Exchange or the Wolfram Community Page I'm sure I'll start to work my way through some of the more hardcore functions given time.

General

Annual report...

Last year I created an annual report to help me reflect on the year and determine what it is that I need to keep the same, change, eliminate, or get counselling from to recover.  I found it a really helpful process so I'm going to try and make it an annual event even though I'm a little late with it this year.

1 What are your biggest accomplishments this year?

Last year I've achieved quite a few things that I wanted to, plus a few nice surprises.

  • I was nominated for an NUS teaching award by one of my students, this means an awful lot to me as it shows I'm appreciated and genuinely making a difference.  Plus I got a mug and some free food!
  • I won the Vice Chancellor's Teaching Excellence Award.
  • I passed my interim assessment on my PhD, although I'm still not sure how.
  • We moved into our new family home and got ourselves established after a much harder build than we expected.
  • I turned 40... quite a few of my friends I grew up with never made it this far. I feel blessed.

2 What are the biggest lessons you’ve learned this year?

I'm a dreadful communicator.  I can sing, dance, argue the point about the most complex of subjects, but I'm rubbish at talking about how I'm feeling, particularly if I'm feeling negative, tired, upset, or worried.  I've plenty of friends who'd let me bash their ears if needed, but I choose not to, I bottle it up, burn out, creak along until I fall over.

177:365 - FBE...

I've been surrounded a lot by serious illness this year, from close family, friends, work colleagues, students... and I've got to admit it's been pretty scary.  There's been times where I've genuinely feared for those I hold dearest and panicked that there's about to be a big hole in my life, I need to let these people know more often how much they mean to me, I've learned that life is fragile and precious.

3 With a grade, how satisfied are you with how you spent the year? Why?

I'd struggle to give this a universal grade.  I'm made up with the new house, it's given us a lot of space and we can have friends round for parties and food which has helped us strengthen relationships with friends and have visitors stay for catch ups, this has really contributed to life quality in a positive way.  The glass is definitely half full...

148:365 - Glass half empty?..

As always there are parts of work I love, parts I'd prefer to have surgically removed, but I attended graduation for the first time last year and I really enjoyed seeing my students graduate, which bearing in mind I didn't want to go to my own graduation is quite something.  It was also nice that we went for a few beers with our students afterwards and I think they liked seeing that we're human too... we think a lot of our students, but sometimes feel we have to maintain a bit of distance.  I'm not sure we've got the balance always right.

I think on the whole I'd give the year a B, because I need to gain more balance between home and work and find some collaborators for my research to work with, but on the whole I'm satisfied.

4 What do you want to accomplish next year, such that it’s your best year ever?

  • I want to learn to relax.
  • I want to make progress on my PhD and I want to build a team around my research.
  • I want to survive my chairmanship with the IStructE in one piece.
  • I want to be more anarchic and chaotic in my thinking and behaviour, I want to challenge convention.
  • I want to surround myself with more brilliant people, to collaborate, contribute, relish....
  • I want to grow.

5 What new habits to cultivate that will help you to achieve your goals in Q4?

I hope to identify better places to work, either through sharing an office space with someone, getting a study buddy to work with or perhaps just working from home more often with a colleague/friend.  I really want to immerse myself in research the coming year, but would work better if I had someone to immerse myself with in the topic.

I intend to chill out a little more, I work far too many hours on too many different roles this sometimes results in me spreading myself too thinly.   More concerts, more beer, more silliness, more doing nothing from time to time...

Untitled

Once my chairmanship is up with the IStructE I am seriously considering walking away from several positions to free up time.  I've learned enough about roles to support/coach/mentor future graduates and I've no intention of pushing for a senior position.  I would like to become a Fellow of the Royal Society or the Royal Academy of Engineering, but I can't see that happening as I'm not linked to either institution and you're nominated for membership.

I will be more anarchic, I'm intending that this will be my last full calendar year as an academic (I plan to leave in 18 months time) and so before I leave I will challenge the system and try and leave a positive mark.  However, if I build a good research team around me with PhD students I genuinely could see me extending my timescale, or sharing myself between academia and an industrial role.  I will try my hardest to not become a passenger, I will be different, I will make a difference...

206:365 - Feeling blue...

6 What are your immediate next steps to achieve these goals?

I will make more time to spend time with the family, this year we started playing board games with the kids and going out for walks.  I just need to try and protect more time to head out with my wife.

Last year I said I'd start growing plants and baking with the kids.... the baking part took off and I learned a few basic recipes and even taught my daughter how to use the electric whisk.  I need to do more of this.

Untitled

I will grow, with purpose, focus, and a mohawk...

 

General

Difference...

Since moving into academia three years ago, I don't think that a week goes by when one of my students doesn't humble me or make me appreciate just how lucky I am.  A few of my students recently have commented that I treat them as equals and peers and they like this.  But in all honesty I don't think I make a conscious effort to, I just enjoy working with people who are enthusiastic about my subjects, regardless of if they're a student, engineer, lecturer, layman, or even a professor.... well maybe not a professor, everyone has limits.  I just enjoy working with people who are prepared to step through the gate and share with me...
221:365 - Plas Newydd...
Last week a student asked me to proof read their personal statement for a PhD application and the words they'd written about the support I'd given them and how much of a difference it made to their outlook on education stopped me dead in my tracks.  I'm rarely lost for words, but it took me a minute or two to compose myself, even though I know the student is grateful for all the help they receive, seeing it in writing was humbling and almost gave me a bit of a wobble.  What I didn't realise is that two years ago they'd have happily walked away from their degree if they'd been offered a job, but with a little support and the right topic for their dissertation, they now enjoy their subject enough to want to take on a PhD in the same area.

This week we've had one of our current students talk to 40 prospective students about how his level of maths skills upon leaving school meant that they couldn't understand simple fractions, but through the support of the foundation degree and the additional Math-Scope sessions we run they now regularly score in the 80's and 90's in maths phase tests at degree level.  They were brimming with praise and pride about what they have achieved, and quite rightly so.  One of the mum's even offered to adopt him she thought he was so inspirational...

And that's before all of the trials and tribulations that some of the students face to simply allow them to attend the course, fund the course, keep up to speed with the work.  Personally I don't think I'd have the resolve to deal with some of the issues that these students take on at my age, let alone in my early twenties.  I am in awe at their get up and go attitude and it's the perfect tonic for when I need to give myself the 'man up princess' pep talk.

For all the crap that comes with life as an academic, it's these special people and moments that make it all totally worthwhile, it's this that keeps me teaching in all honesty and it's the pride I feel for my students that has stopped me jumping back to industry on several occasions.  Because the secret is; the lecturers probably learn just as much from the students as they do from us.

If you're thinking of becoming an academic, brace yourself to be humbled regularly and get used to the odd damp eye.  There are a lot of very special and amazing students out there, all you have to do is remember that they're people too.

General

Mathematica Valentines...

Sharing the love through Mathematica... even equations can be beautiful.

How to plot a love heart using maths.

 

 

Taken from here.

Teaching

Mentoring...

Ever since I graduated I’ve always wanted to learn new things and for that reason I’ve pretty much always had at least three different types books on the go at any given time.  Typically I have a fiction book to read when my brain is really tired, a technical book linked to engineering, maths, or programming, and some sort of self-improvement book.   I want to be the best I can be, to reach my full potential and not be limited by my lack of understanding.

007:365 - Unlimited...

Over the past few years I’ve been spending quite a bit of time thinking about how mentoring (and what I believe to be the lack of) is affecting the environment for modern graduates in industry.  As margins become tighter and tighter in industry, the experienced engineers have less and less wriggle room to spend mentoring graduates.  Instead the experienced engineers merely push the less-experienced engineers to a quick solution so that deadlines are met and fee structures are not blown – resulting in a shallow learning experience.

I’ve always tried to make time to help less experienced engineers understand new concepts, even if I think they should know them already from University.  This has meant frequently giving up my dinner hour and time after work to help someone understand a new concept.  I’ve not always been successful and that’s a limitation of my skill and something that I’m getting better at with time as I improve as a mentor, but as time goes by I wonder if my approach is mentoring or coaching?

Most of the time I spend on a 1 to 1 basis with students takes the form of conversations and specific questioning to change the way they think about things.  To change or reinforce their perceptions about how something can be improved in the future.  This is the commonest form of mentoring that I’ve taken over the years, but through what I’ve read of Starr (2010) this approach isn’t mentoring at all, it’s more like coaching.  It’s essentially a series of conversations to help change a future outcome.  One of the favourite activities I teach is the supervision of dissertations, this is the module I can see the biggest leap in a student’s abilities, particularly with regards critical thinking and it presents the biggest opportunity that I get to mentor and build a connection with the students.  It’s the one area that probably sucks a disproportionate amount of time out of my week but it’s definitely where my mojo (Goldsmith, 2010, p17) lies when I’m teaching.

It’s this connection with the students and their topics I think that I enjoy the most, especially as I watch them grow and I still get emails and calls from some of the students that I supervised a few years ago simply so they can let me know what they’re up to.  Of course quite a few students only get in touch when they’re chasing a reference or contacting me because they want something from me but when someone drops you a note to say hi or let you know what they’re up to now without wanting anything from you it's personally very rewarding and it’s this type of contact that I treasure as it’s then that you know you’ve made a real impact on someone’s perspective on life.

Dissertations are also one of the key activities that is keeping me in academia, as it’s giving me an opportunity to continually learn and grow on a personal level although the longer I stay in academia the lower my career progression opportunities and the lower my earning potential become…. Perhaps Robert Greene (2012) is right, when looking back on my life nobody will remember the wonderful report I sacrificed weekends and evenings to complete, but perhaps they’ll remember the time I gave them to help improve their critical thinking skills and understanding of structural behaviour and I know my kids will hopefully appreciate the time we have together now I’m no longer being continually shipped out all over the place to design buildings.

068:365 - Behind the Wheel...

After all I’ve changed quite a few skylines around the world when I had a proper job, maybe there’s more satisfaction to be had creating brilliant engineers to create even more radical designs.  Or perhaps there's a compromise to be had by spending some of my time teaching and another chunk of my time working with brilliant engineers and architects to design really radical and life-changing designs... I think this could be where my future lies in all honesty, it's about time I seized the steering wheel again as these things don't happen by themselves.

References.

Goldsmith, M. (2010). Mojo. London: Profile Books.

Greene, R. (2012). Mastery. London: Profile Books.

Starr, J. (2010). The Coaching Manual (Third ed.). London: Pearson Business.

 

 

Tutorial

ROBOT....

The analysis software of choice at the University is ANSYS and whilst it is a very powerful piece of software it can be a little overwhelming at times for students who are starting to learn how to analyse structures.  Whilst we start them on hand techniques such as moment distribution and then through to matrix methods combined with using LinPRO there's a bit of a jump from those into full blown finite element packages.  One of the good things about being an academic again is that I get access to free copies to all of the AutoDesk software and so I've been giving ROBOT Structural Analysis a whirl to see how I get on.

360:365 - Robot...

I've not really used this software in anger yet, but it's comparable to many of the alternative offerings out there that I've used over the years such as QSE, Masterseries, GSA, and SFrame to name a few.  Whilst LinPRO is only 2D, ROBOT brings in the extra dimension to allow 3D frames to be analysed, and importantly for me and the dissertation topics that I offer, it also has the capacity to deal with cables and tension only elements and its this aspect rather than the building modelling that I've been really interested in for the last couple of days.  I started by modelling a simple guyed mast just to see how well it was behaved under dead and live loads.  A nice simple model like this has let me mess about with the different ways of controlling the cable tensions and seeing how the various settings in the analysis engines and element releases work.

Screen Shot 2013-09-06 at 14.32.18

After spending a little time getting my head around the releases, for some reason a local x axis restraint doesn't stop the mast spinning with a fixed base, so I had to throw a Global Z restraint to get it to analyse with no warnings...  as a newbie to the software, I'm sure I was probably doing something wrong, but it's all about learning and so there's nothing to beat myself up about.  I was able to get a pretty simple model up and running that seems to be fairly well behaved after about 10 minutes of tinkering which gives an idea of the learning curve involved.

There's a couple of forum posts knocking about that discuss where people have had errors with getting their models to converge, but this appears to be mainly through the application of very large prestress or large change in lengths that are incompatible with each other, meaning that the forces can never balance out based on the criteria set out.  The easiest way I've found to get round this initially is to set the lengths to have a zero change in relative length (as shown below), essentially taking their original starting length with zero prestress or by assigning a very low prestress of say 1kN or 5kN depending on the scale of the system.

Screen Shot 2013-09-07 at 13.52.12

After a bit of jigging round, I've managed to get a few different types of cable supported structures behaving themselves, from simple gallow brackets, to cable trusses, and even a simple icosahedron tensegrity prism.... although I need to spend a little more time rotating the geometry to reduce the number of supports needed for the prism.

Screen Shot 2013-09-06 at 16.35.37

Now I've got the models behaving and analysing efficiently, I can start to experiment with what difference the various analysis engines make and how they can affect the behaviour of the structure, particularly as I start to increase the complexity into cable nets and stacked tensegrity prisms.  One thing that I'm finding difficult is tracking down a decent ROBOT community, particularly as I think there are quite a few things I could be doing with the API to connect it with Mathematica.

If anyone knows of one, I'd appreciate a heads up or a link....

General Teaching

Inspiration...

Whilst I've been in academia for about 2 and a half years now, I've only just seen off my second batch of first years and attended my first graduation (after much cajoling by a few final years).  Having a significant birthday approaching I've been thinking a great deal about what am I going to do for the next few years until retirement, I enjoy the teaching a lot and working on dissertations gives me tremendous pleasure, but I miss designing buildings is the dilemma that I've been having.  But there's one aspect I'd not really considered when I moved to academia, and that's that I genuinely love learning and essentially I'm getting paid to learn... not as well paid as I would be as a consultant, but I get a lot of time to be very self-indulgent and learn new skills.

056:365 - The Crescent...

I try hard to not be the kind of lecturer that I had to endure when I was doing my degree and typically put anywhere between 5 and 12 hours of preparation behind every hour of lecture that I deliver.  I'm not saying that my lecturers weren't prepared, they certainly knew their stuff, but they were really dry and tedious in their delivery and at times it felt a little like they were padding.  I had hoped to at least inspire a few of the engineers of the future and hopefully I've done that by combining my industry background with my enthusiasm, but what I hadn't counted on was that my students would inspire me and teach me all sorts of things about the world and myself.

Having been fortunate to work with engineers, architects, and clients who have really been brave and pushed the boundaries of my abilities with the result that we've created some truly fantastic buildings together, I foolishly thought that all of this experience meant that as the lecturer the ability to inspire was my sole domain, but I'm frequently humbled and inspired by my students.  I'll comfortably pull 17 hour days when I've a bee in my bonnet and can sustain this pace for several months at a go, but I've students who put my work ethic and self-discipline to shame.

002:365 - My brain hurts...

The beauty of teaching classes far in excess of a hundred students (many of whom are international) is that they come with a multitude and wealth of experience and perspectives.  Each of them are complex individuals with differing opinions and backgrounds and in all honesty I'd never really encountered this level of diversity in industry.  Each week I'm humbled and gain new perspectives from the students, some of whom have faced more adversity than I ever could have imagined and yet still manage to achieve impressive results and retain their ability to be great humans.  Something that perhaps I've lost track of at times during my career, but that hopefully I'm regaining as the days tick by.

When I joined academia, I had a clear exit strategy... 3 years and then exit back to industry.  It's not that clear cut any longer though, I was prepared to be the lecturer... but I don't think I was prepared to become the student and I'm discovering that I've still so much to learn that I may just have to hang around a little while longer than I had planned.

General Teaching

Critical thinking...

One of the biggest challenges that I face as a lecturer is helping the students to develop their critical thinking skills, especially with regards problem solving as this is one of the key skills an engineer should possess.

It's a fundamental skill for a practicing engineer to not only problem solve, but to critically review the problem and reconstruct it so that only the important parts are focused upon.  Essentially honing in on the nub of the problem.

I'm a fan of using stories in lectures and I used to work with an Italian engineer who unfortunately died last year and he had a plethora of stories and anecdotes that he paraded out whenever the occasion arose.  One of his numerous stories that sticks in my mind and that I think I'll start using in my lectures about critical thinking involves three construction professionals on a train ride to Scotland for the first time.

35:52.5 - Scarborough Flyer...

There is an Architect, a Project Manager, and an Engineer on a train together and as they cross the border into Scotland for the first time on a train racing through the countryside they spot a brown cow in a field.

The Architect, being the first to spot the cow, declares that clearly all Scottish cows are brown, the Project Manager who feels that he clearly has the organisational skills to rationalise this observation and thinks that the architect hasn't been critical enough, decides to correct the Architect and notes that in reality what the Architect has actually observed is that in Scotland there is a field which has brown cows.

The Engineer meanwhile has been listening intently to this discussion and decides to correct them both by sharing his observation, that in fact there is in Scotland, a field, that contains a cow, one side of which is brown.