Feeling unwelcome at the Times Higher Education

The Times Higher Education. Undoubtedly the newspaper of my profession. And yet I’m now feeling rather unwelcome there.

Why? Well as regular readers (!) will have noticed, I’ve recently joined Twitter. Looking around at suitable people to follow, I found THE were regular tweeters, and decided to follow them. A lot of their tweets led to interesting articles on their website, and in order to read those I had to register on their site.

One of the pieces of information they collect during the registration process is job title. So I started looking down the list. “Academic” was not there. I looked on, past “Lecturer” and “Professor”, past “Reader” and “Researcher” (both Junior and Senior), past “Student” and then onto “Vice-Chancellor / Principal”.

“Hang on”, I thought. “What about the teachers?” Not there. You cannot register with the Times Higher Education as a “Teaching Fellow”, “Teaching Assistant” or “Teacher”. I had to register as “Other”.

It would appear that anyone with research as part of their job description (including “Research Administrators”, but notably no other administrators) are welcome to register using their real job titles. But anyone whose job starts with the letters ‘T’, ‘E’, ‘A’, ‘C’ and ‘H’ isn’t.

Why does the Times Higher not acknowledge the teaching specialists on the registration form? Could it be that they are, in fact, very rare, and most universities don’t employ them? In which case I’m very lucky to be employed here: in the department where I work there are more Teaching Fellows than Readers (and Lecturers only outnumber us by one).

If it’s not rarity, then I’m really struggling to think of a good reason, especially in these days when teaching quality seems to be becoming a real issue for universities. Someone more paranoid than me could even interpret this as yet another symptom of the traditional priority given to research activities.

BTW I did contact THE about this, and received a polite reply saying that they would bear this issue in mind when they next review the registration process. I’ll keep an eye out to see if anything happens.

Posted in Uncategorized | Leave a comment

An interesting challenge

We were discussing the future of the first-year digital electronics module here recently. We’ve just built some digital logic boards that allow students to program a CPLD on the board to produce a variety of dice, traffic light controllers, slot-machine systems, and all the usual sort of introductory digital systems designs. Currently we use the Xilinx ISE tools, which is great in that their WebPACK systems allow the students to install the software on their own machines free of charge. The problem is that the Xilinx schematic entry tools (which we have to use as the students haven’t learned VHDL or Verilog by the time they take this course) are not particularly robust, and students spend a lot of time, and need a lot of help, getting the software to work.

Since almost no-one in industry uses schematic entry any more, I can see it’s not a high priority for Xilinx to spend much time on this, and the schematic design route might even disappear in a future version of ISE (after all, the facility to draw test waveforms has already gone, so the students have to use VHDL test benches with their schematic designs already). If Xilinx do remove schematic entry from a future version of the ISE, then we’re in trouble…

…unless we can find an alternative design route from schematic to CPLD. This is where it gets interesting. These are first-years, they don’t do anything particularly complex (they learn VHDL before they’re required to do any complex design) so we wouldn’t need anything much. Now I already have a digital simulation program with schematic entry facilities. I reckon I all need to add is hierarchy, busses, and the ability to output the schematic design to VHDL. None of which sounds that difficult, and all of which sounds like it could be quite fun.

Writing our own schematic -> VHDL tool would also allow us to write very simple, easy to understand and well-commented VHDL. (Some of the automatically produced VHDL I’ve seen from other tools is unreadable, at least by humans.)

I’m actually itching to get started on this. Maybe I’ll start it up in a slow way, so that if it never happens I’ll not be too disappointed. In the meantime I should be getting on with the stuff that I know is definitely going to get used.

But it’s nice to have a dream…

Posted in Uncategorized | Leave a comment

Oh, and I’m now on Twitter

There is one thing new – regular readers (!) will notice a new “Tweet” button in the right-hand margin. Perhaps I should have a different one on each page? I must investigate twitter plugins for wordpress at some stage. I’m still not entirely sure how this twitter thing works, I’ve been very suspicious of social media up until now, but I’ve recently been persuaded that it can be quite useful, and might help publicise this site.

Also, I’ve had a really helpful email pointing out a potentially confusing point in the introduction to complex numbers chapter, and that has been very useful, so I’ve just had a convincing demonstration that more publicity would be a good thing.

So, I’m now @DavePearceYork apparently. I’ll tweet when there’s anything new on this site, or any other point of interest comes up. Anyone out there who uses these or similar demos in their teaching, and also tweets – please get in touch.

Posted in Uncategorized | Leave a comment

Nothing much is new… yet

I’ve not posted much recently, but now the summer is here my workload eases off a bit, and I can find a little more time for this site. I have still been writing software, but a lot of it hasn’t been demos; I’ve spent quite a bit of time on an automatic marking and feedback generating system, which is saving me a lot of time. I get very little time to mark and provide feedback on nearly 500 scripts at the end of the academic year, and anything that I can prepare in advance that can save me some time during the marking weeks is very useful.

I’ve been doing a bit of bug-fixing and adding new features to some of the existing programs as well, in particular a new mode for the digital simulator program that I did for a few “widening participation” sessions. The problem – how you give a classful of 14 year-olds a hands-on impression of what electronic students study, when I can’t assume that any of them even know what voltage is, and I’ve only got an hour. Solution: teach them binary, then simple logic, and get them to simulate a circuit (one of the advantages of having a really easy-to-use simulator) and then wire something up on a set of digital logic boards and see it working.

Perhaps a little ambitious for an hour, but it seemed to work – and being able to use the digital demo on an interactive whiteboard was a lot of fun for me. You can’t right-click on an interactive whiteboard, so that required a new feature, and there were a few more preset included of really simple circuits for them.

Anyway, the two next programs scheduled for putting up here will be a flow and congestion control demo (I’m getting this ready for a summer school on satellite communications that I’m going to next month), and a new audio network analyser program – however that’s not a Silverlight demo, it’s a standalone C# program, using the NAudio library. That one’s finished really, I just need to document it a bit better and I can put it up here. Watch this space…

Posted in Uncategorized | Leave a comment

I’m still here…

Haven’t posted for a long time, and there have been no new demos for quite a while either. Why? Well, mostly because I’ve been in maintenance mode. I re-wrote some of the lab scripts for our first-year students to use some of these demos (mostly the analogue and digital simulators) and they’ve been finding a few bugs and suggesting a few new features.

So: the analogue and digital demos now don’t have that annoying feature whereby a saved design sometimes loads in and wires itself up differently when terminals are very close together; the digital demo no longer suffers from an occassional problem with terminals that can’t be wired up; the oscilloscope in the analogue demo now prints up the scales being used on the axes; there is a new fine frequency control in the a.c. analogue demo; and so on.

Next term I have to master the Xilinx ISE and an ARM development environment for a couple of new labs, so I might not be setting out on anything too new for a while… although I do have a final year project student who is working on adding a shadowing model to DANSE, which might be very interesting.

I will get round to adding some more chapters soon, although currently the pile of marking in front of me has to take priority 🙁
If I don’t get round to writing again this year, I’ll take this chance to wish all readers a happy holiday season and good fortune for the new year.

Posted in Uncategorized | Leave a comment

Simple queueing demo added

The demo for August is now on the site: it does simple queueing systems. I’m teaching this stuff again next year, so I though this would be useful. It’s not entirely new this one, it’s a re-write of a demo that was originally done a long time ago in VB, but now it’s available in Silverlight and on-line.

It’s in the “Maths and Basic Concepts” section.

(By the way, if you’re wondering why I’ve spelt “queueing” with two ‘e’s when it’s more commonly spelt with just one, it’s because it is (as far as I know) the only word in English with five consecutive vowels, so I think it should be preserved where possible.)

Nothing more from me for the rest of this month – I’m going on “holiday”. I put that in inverted commas since I suspect this is going to be the sort of holiday that is enjoyed some time afterwards; it’s proving to be very stressful to get everything ready for this trip. I must make a resolution not to plan any holidays quite so adventurous in future; they are supposed to be relaxing, aren’t they? Isn’t that the whole point?

Posted in Uncategorized | Leave a comment

Hackings

I just got hacked. Maybe I’m a little naive, but I couldn’t believe anyone would bother to hack this site. And yet they did. I’ve restored it as best I can, and I think it should be all back up and running, but I haven’t checked everything. If you spot something not quite right, please let me know.

I’d also like to apologise to anyone who visited this site over the last couple of days and found themselves re-routed by an apparently South American hacker to something much less helpful and friendly. I’ve no idea how they got in, but if they did it once there’s a good chance they could do it again, so it might happen again. I don’t really get the motivation, it’s just vandalism.

Posted in Uncategorized | 1 Comment

Saving and Loading in the Analogue and Digital Simulators

Silverlight 4 can access the clipboard. That’s extremely useful, since it means there’s an easy way for these demos to load and save things: just copy any relevant information to/from the clipboard. I spent some time over the weekend adding this functionality to the analogue and digital simulators, so you can now save and load your own designs. This could be very useful for me as well – I could get students to produce a design and submit it for testing and marking.

Anyone who tries this might notice that the text representation of the designs copied to the clipboard is a series of lines of C# code. This was done to make adding new presets easier: if I want to add in another preset, all I have to do is copy these lines into the source code of the demo.

Anyway – that’s all for now. A small update perhaps, but I hope a very useful one. It’s not fully tested, so if you find anything odd happening, please let me know.

Posted in Uncategorized | Leave a comment

Matrix inversion in C#

I was talking to someone about my demos the other day, and he mentioned that he’d tried to find a simple matrix inversion routine in C# on the web, and not found one he could easily understand. So, for what it’s worth, I thought I’d post the one I use. It uses the System.Numerics namespace for the Complex structure for complex numbers, and a straight-forward Gaussian elimination technique with pivoting. It returns “true” if the inversion was successful, and “false” if the matrix is singular. Somewhat controversially, it does carry on with the inversion when the matrix is singular, but in these cases the result will normally be rubbish.

The theory behind this technique is described in the book chapter on Gaussian Elimination, now available in the Linear Algebra section of the book.

Just in case anyone finds it interesting / useful, the code is here:

// The complex matrix inversion routine:
internal Boolean MyInvertMatrix(Complex[,] A, out Complex[,] invA)
{
    // There are faster ways to do this, but for simplicity
    // and to get something working quickly, I'll just write a 
    // simple Gaussian-elimination matrix inverter here, and look 
    // at speeding things up later.

    // Keep a record to see if there is a sensible inverse:
    Boolean bNotIllConditioned = true;

    // If the matrix is not square, there is no inverse:
    if (A.GetLength(0) != A.GetLength(1))
    {
        invA = A; // Have to assign something to invA before returning
        return false;
    }

    // This routine destroys the matrix it's working on, so I'll first 
    // make a copy of it, as well as setting up the output matrix invA 
    // as a unit matrix of the appropriate size:
    int dimension = A.GetLength(0);
    Complex[,] working = (Complex[,])A.Clone();
    Complex[,] inverse = new Complex[dimension, dimension];
    // C# will set the initial values to zero, so to create a unit
    // matrix, I just need to fill in the diagonal elements:
    for (int loop = 0; loop < dimension; loop++) inverse[loop, loop] = 1.0;

    // OK, first convert working to upper triangular form:
    for (int loop = 0; loop < dimension; loop++) // for each row
    {
        int currentRow = loop;

        // First step is pivoting: make sure the biggest element
        // remaining in any column is on the next row.  First, find
        // the biggest element remaining in the current column:
        double biggestSoFar = 0.0; int biggestRow = currentRow;
        for (int x = currentRow; x < dimension; x++)
        {
            double sizeOfThis = working[x, currentRow].Magnitude;
            if (sizeOfThis > biggestSoFar)
            {
                biggestSoFar = sizeOfThis;
                biggestRow = x;
            }
        }

        // and if this is not at the top, swop the rows of working
        // and inverse around until it is:
        if (biggestRow != currentRow)
        {
            Complex temp;
            for (int lop = currentRow; lop < dimension; lop++)
            {
                temp = working[currentRow, lop];
                working[currentRow, lop] = working[biggestRow, lop];
                working[biggestRow, lop] = temp;
            }
            for (int lop = 0; lop < dimension; lop++)
            {
                temp = inverse[currentRow, lop];
                inverse[currentRow, lop] = inverse[biggestRow, lop];
                inverse[biggestRow, lop] = temp;
            }
        }

        // Then, go down the matrix subtracting as necessary
        // to get rid of the lower-triangular elements:
        for (int lop = currentRow + 1; lop < dimension; lop++)
        {
            // Matrix might be ill-conditioned.  I should check:
            if (working[currentRow, currentRow] == 0)
            {
                bNotIllConditioned = false;
                working[currentRow, currentRow] = Globals.TINYDOUBLE;
            }
            Complex factor = working[lop, currentRow] / working[currentRow, currentRow];

            // If the matrix is fairly sparse (quite common for this
            // application), it might make sense to check that the 
            // lower elements are not already zero before doing all
            // the scaling and replacing:
            if (factor != 0.0)
            {
                // Only have to do from current row on in working, but due
                // to pivoting, might have to do the entire row in inverse:
                for (int lp = currentRow; lp < dimension; lp++)
                    working[lop, lp] -= factor * working[currentRow, lp];
                for (int lp = 0; lp < dimension; lp++)
                    inverse[lop, lp] -= factor * inverse[currentRow, lp];
            }
        }
        // That's it for this row, now on to the next one...
    }

    // Now with the working matrix in upper-triangular form, continue the same
    // process amongst the upper-triangular elements to convert working into
    // diagonal form:
    for (int loop = dimension - 1; loop >= 0; loop--) // for each row
    {
        int currentRow = loop;

        // Matrix might be ill-conditioned.  I should check:
        if (working[currentRow, currentRow] == 0)
        {
            bNotIllConditioned = false;
            working[currentRow, currentRow] = Globals.TINYDOUBLE;
        }

        // Then, go up the matrix subtracting as necessary to get 
        // rid of the remaining upper-triangular elements:
        for (int lop = currentRow - 1; lop >= 0; lop--)
        {
            Complex factor = working[lop, currentRow] / working[currentRow, currentRow];

            // There's only one element in working to change (the other elements
            // in the row of working are all zero), and that will always be set
            // to zero; but you might have to do the entire row in inverse:
            working[lop, currentRow] = 0.0;

            if (factor != 0.0)
            {
                for (int lp = 0; lp < dimension; lp++)
                {
                    inverse[lop, lp] -= factor * inverse[currentRow, lp];
                }
            }
        }
        // That's it for this row, now on to the next one...
    }

    // Should now have working as a diagonal matrix.  Final thing is 
    // to scale all the rows:
    for (int loop = 0; loop < dimension; loop++)
    {
        Complex scale = working[loop, loop];
        for (int lop = 0; lop < dimension; lop++) inverse[loop, lop] /= scale;
    }

    // That's it.  inverse should now be the inverse of the original matrix.
    invA = inverse;
    return bNotIllConditioned;
}
Posted in Uncategorized | 2 Comments

Update on news…

This month’s new demo is one to illustrate Bode Plots. Not a very complicated one, but my programming time has been dedicated to other tasks recently – most notably some way to automate and speed up getting feedback to students for the 450 lab scripts I’ve been marking, as well as entering the resultant marks into the database here. I’ve also been working on a little application that looks out from a webcam, spots movement, and transforms the movement into patterns of light and sound. It’s rather fun.

Why? Well, apart from being fun, we have over here something called the Illuminating York festival. It’s a tourist thing – it’s in late October when there aren’t as many tourists around, and there’s lots of spare rooms in the B&Bs. Anyway, some of these lightworks (is that a word?) come with sound accompanying them, and I thought it might be interesting to make an interactive one. Point a webcam at a street, and convert the movement of the passers-by to patterns of light and sound. Then I bumped into an old acquaintance who works in music therapy for Accessible Arts who expressed an interest, so I adapted it to see if it would be of any use to them. Very interesting this – and nice to get such direct feedback. I think there is perhaps something I can do, but it would be so much better if I could get a Kinect hooked up so I can eliminate all the movement going on behind the “player”. That was, I think, the most obvious problem with the prototype.

On the plus side, all teaching has now finished until October, so with luck I’ll be able to keep to the original plan of one demo per month over the summer. I’ve no idea what the next one will be though – perhaps something to do with Markov Chains or MAC Protocols – I’m due to start teaching both of those in the next academic year. I’ll try and get some more chapters of the book up as well.

Posted in Uncategorized | Leave a comment