Double bluff
/I was looking for my headphones today and for a change I thought I’d start with by checking the place where they are not supposed to be. Of course they were there. I’m not sure whether to be pleased or angry with myself about this.
Rob Miles on the web. Also available in Real Life (tm)
I was looking for my headphones today and for a change I thought I’d start with by checking the place where they are not supposed to be. Of course they were there. I’m not sure whether to be pleased or angry with myself about this.
I read a thing on the internets a week or so back where someone said that they thought blogging is returning. My dear, for some of us it never went away. I’ve got around 20 years of blogging under my belt. My older stuff is here. Good luck with that. Actually, I’m really pleased I’ve got these posts lying around. I’ve rediscovered lots of things that I’d completely forgotten doing. I’ve just spent a happy half hour reliving past glories and humiliations from way, way back.
I think that if I have one piece of advice for folks starting out in life I’d strongly advise them to blog, or at least keep a diary. There are a whole bunch of good reasons to do this:
Writing a diary will keep memories that you might otherwise lose. OK, in these modern days it is very easy to snap pictures or post things on social media about what you’ve done, but who knows if Facebook and whatnot will be around in the long term (more than 20 years or so). And writing about something lets you add a personal context.
Writing a diary lets you practice your writing. This is a huge thing. Writing is how a lot of communication gets done, even in the days of visual media and video. You need to get good with your writing skills. Writing regularly will make you better at writing and what better subject than yourself.
Writing a diary lets you “park” things in your life. If there’s something worrying you just whack it in the diary and then forget it for a while. I find that writing about something greatly reduces its power to upset me. And when I go back and re-read the entry I frequently wonder why I was so upset at the time. Conversely, I sometimes spot things that at the time didn’t seem to be important but actually turned out to mean a lot.
It makes you like yourself a tiny bit more with each post. Reading about cool things that you’ve done (even if it’s wash the car or tidy the office) makes you realise that actually you are doing stuff and making a difference, starting with yourself.
When I started blogging I joked that I was doing it to force myself to make my life more interesting otherwise I’d have nothing to write about. This is not really how it turned out. Eventually I found a writing voice that worked for me and I managed to find a way (or feel that I’d found a way) to write about nothing much in a vaguely interesting way. I set myself a completely artificial challenge of blogging every day. I’ve not always managed it, but I’m quite proud of what I have achieved.
I’m not saying you should blog publicly if you don’t want to. I keep a diary of stuff I’m doing which is a bit of a log book/personal journal and I take things out of that to use in the public facing blog. You can just open a text document and type something every day.
Cunning tip - you can use the lowly Windows notepad program to automatically time and date your diary entries. Just put the text “.LOG” at the very top of the file and each time you open it you’ll find yourself at the bottom of the document, with the date and time added.
I’d strongly advise you to have ago. One other piece of sage advice. Don’t feel you have to write something every day. Only an idiot would do that. Don’t consider a lack of posts a failure. You are putting your thoughts down every now and then to make yourself feel better, not worse. Just do it when you feel like it. And after a while you might find that you are making five minutes here and there to jot things down at regular intervals, and then you’re a diarist.
I’ve found a use for my Talking Pomodoro timer. I’ve decided that I’m never going to tidy my office properly. I start the task and then, after a while, I either run out of steam or find I’ve added so many extra tasks to to the job that the whole enterprise just collapses on itself.
So, spending a day tidying up will never happen. But half an hour a day, that sounds possible. So I set the timer for half an hour and then start tidying. When the timer goes off I stop tidying and go off and do something else. That way I don’t expand the task or give up because the job is too large. It’s kind of working so far, in that there is a tiny corner of the room where I can see the floor….
It turns out that the Apple watch can’t tell the difference between piano practice and exercise. Perhaps it is the way that I get cross when I make a mistake and wave my arms around, plus the nervous energy that I expend navigating some of the trickier parts of “The Entertainer”.
Anyhoo, this works rather well for me in that I get a double whammy of virtuous credit just by sitting down at the keyboard and failing to play something properly.
I’m working on the slides for the Red Nose Day lecture in rhyme. Sponsor me. Then come back and read the rest of this post.
Ah, there you are. Thanks very much. I’m using the latest version of PowerPoint. It has this “Design Ideas” feature that takes your slide, does something “AI” with it and then suggest a layout. The original design is below, and is perhaps a bit boring.
OK, forget perhaps. It is a bit boring. PowerPoint Design Ideas suggest this instead:
This is a lot less boring. I love the way that it has found suitable icons for all the points and then laid it out for me. I’m not sure that I’ll use it in this case, but it has suggested lots of other options too which I can incorporate into the presentation. It also found a wonderful piece of animated art for the start of the presentation. Which you’ll have to come along on Friday the 18th of March to see.
Up until recently I thought that a tool like PowerPoint had probably got about as useful as it could get. It’s nice to see that there are still ways it can be improved.
I found this on Clive Maxfield’s blog. I’ve sworn off new gadgets for Lent (no - really) otherwise I’d be rather tempted.
I’ve long been convinced that communication skills are crucial for engineers. Actually, I think they are crucial for everyone, but their importance needs to be sold to us techies. We tend to focus on solving the problem rather than telling people what we have done and why it is a good idea. In my experience an engineer can make themselves around 10 times more useful simply by learning how to communicate properly.
And the critical message for an engineer is that presenting is a skill that can be learned. I used to tell students that they should approach being able to present well in the same way that they would learn a new programming language or application programmer interface (API). In other words, find out how to do it and then do it.
It’s lovely to see that other people take this seriously too. Clive Maxfield and Lucy Rogers have some great things to say about the importance of presentation and how to do it. Both are splendid folks who are well worth following.
Taking a BMW i3 through the field..
I’ve been playing the new Gran Turismo game for a couple of hours this morning. So of course I can now write the definitive review. Actually, I’ve been playing the game since version one on the original PlayStation, when we took a lowly Nissan to dizzying heights of success by a combination of a lot of tuning and bashing all the other cars off the road in the corners.
The new game is very true to the heritage of the older ones, even to the point of being a bit “up itself” with slow motion videos of the Wright Brothers and Einstein at the start. You even get to do qualifying races. Remember them? When the game first came out it was as if it was testing you to see if you were worthy to play it. It still feels like that.
Anyhoo, there are some new flourishes. There’s this strange music mode thing which you seem to have to do for a while before you get to the main game. There’s also a café where you can go and get menus of things to do. Everything loads pretty much instantly. This is literally a game changer. It means that you are tempted to have a go at shaving a few fractions of a second off that time, just because you know that you will be put back into the driving seat instantly when you retry. The graphics are better than real. I don’t think you could get these images with a camera.
Stopping for a coffee.
There are lots of races, hundreds of cars (including my beloved BMW i3) and tuning and detailing options galore. The driving experience is sublime with a special shoutout for the weather effects. There are lots and lots of things to do. You could go and live in this game. And with the state of the world today, I reckon it would be a pretty good option.
If you like Gran Turismo you’ll love it. If you’ve played a lot of Forza Horizons you might wonder what all the fuss is about, and ask why you can only race around tracks and not just drive anywhere. You might also question why the soundtrack is so bland and ask about missions. But these things are kind of beside the point. Gran Turismo really is about the driving and cars, not about narratives. And in that it succeeds brilliantly.
We’re having an on-line Hardware Meetup tonight at 6:00 pm GMT. You can find out the details and join us here.
If you’re trying to find the cheapest possible way of getting hold of the latest version of Gran Turismo you might like to know that Shopto.net are selling PlayStation network Gift Cards at around 12% off. This means that you can pick up a copy of the game for around 60 pounds rather than 70. This is of particular interest to people like me, who have the version of the PS5 without a disk drive.
The Canon EOS 650 is a landmark camera. It launched the Canon EOS (Electro-Optical System) lens fitting which persists to this day. I acquired one by accident when I bought a second-hand Canon outfit a while back. I really wanted the lenses, which worked on my newly acquired Canon digital SLR.
What with analogue film being currently trendy I thought I’d take the camera out and put it through its paces. The auto focus is as snappy as any modern camera and the exposure seems sensible. Everything works fine, including the automatic wind and rewind. I find it amazing that this camera works so well, bearing in mind it is well over 30 years old. You can pick up a camera like this for around 20 quid on ebay. Kits with lenses start at around twice that. If you want to get into film photography this seems a very nice place to start.
Of course, I don’t really know how well the camera works just yet. I’ve got to get the film developed…
It’s taken a while, but I’ve finally sold my broken video walkman. I had to drop the price, what with it being broken and all but I hope that the new owner is able to do something useful with it.
I got asked today what Bitcoins and NFT (Non-Fungible Tokens) are all about. So I thought I’d write something.
Let's start with your bank. Whenever you receive some money (yay!) or pay a bill (boo!) your bank adds a transaction record to a list held in your account records. If I was running the bank, I'd be very worried about someone messing with this transaction list. I wouldn’t want a cunning programmer who works for me giving themselves extra cash, deleting their spending records or fiddling with their transactions.
One way to stop such tampering is to turn a transaction list into a blockchain. Each bank transaction is now stored in a block which is linked to the ones before and after it. Each block contains a cryptographic hash of the block before it in the chain.
What's a cryptographic hash? I hear you ask. It's a way of validating the contents of a block of data. What does that mean? Well, assume that I want to store my name, "Rob Miles", and I want you to be able to prove that the stored name is correct.
I could store my name along with a value that proves the name is correct. A bad way to do this would be to store "Rob Miles" and the number 829. The value 829 is the result of adding the character codes for my name together. The letter R has the value 82, o is 111 and, b is 98 and so on. When you read back the name you calculate the check value from the data and compare it with the stored value. If they are different either the hash or the data are wrong. This validation mechanism is called a checksum and it is used throughout computer networks to detect data corruption caused by transmission noise.
We don't use checksums to validate the data in a block because it is too easy to fool. You could use 829 to prove a name was "Rob Miles", but this value would also work for the name of my strange cousin "Rpa Miles" because character code for p is one greater than o, and the character code for a is one less than b. A cryptographic hash is a transformation created to produce a different value for every unique lump of data that it receives. Of course, this is not really possible. If the hash value is of finite size (say perhaps 10 digits) and the block of data being hashed is very large (say perhaps a megabyte) there must be lots of blocks of data that would generate the same hash, but the chances of this happening are sufficiently small for us not to have to worry about this. A cryptographic hash has one other feature, it is designed to be non-reversible. In other words, it should be very hard to work out the data contents of a block given the hash value.
If a block contains the cryptographic hash of the one before it in the chain it makes it impossible to modify a block without breaking the chain, since the hash value in the following block would now be wrong. It is also impossible to add or remove blocks in the chain because his would also corrupt the hash values.
Block chains are actually a great way to store data. Consider hospital patient records. You could store details of each patient in a huge data structure and then modify the contents of that structure each time something about the patient changes. If they change their name your program would have to find the patient record, modify the name in the record and store the record again, which would be quite hard work. It would be much better to hold each patient record as a blockchain. Rather than change the properties of the patient record you just add another block to the chain that describes the change you have made. The disadvantage is that to get the up-to-date status of a patient you have to scan down the blockchain, but the advantage is that you get a complete history of changes to the record for free, because all changes are stored in the chain.
So, blockchains provide a great way to store structured data, but what about cash? Lets assume that you want to start your own currency. You don't want to tie it to any particular bank or organisation. Instead, you want the currency to be as open and useable as possible. Well, it turns out that a blockchain can help here.
You create a library of software that allows anyone to use their computer to host and manage account blockchains. Transactions are inherently secure because they are stored as blocks in the chain. The account storage is robust because the blockchains are stored on lots of machines which talk amongst themselves and make sure that all the chain stores are synchronised. The only problem that you have now is persuading people to run your currency server code on their machines. Enter our digital currency.
Up until now humanity has based its currencies on something physical, starting with things like lumps of gold but more recently coins and bank notes. We manage our money using phones and computers but underpinning it is the principle that you can walk into a bank and ask for your cash in physical form to take home and hide under your mattress (don't do this). The bank just holds a number that specifies how much cash you have, not the money itself.
A digital currency replaces the gold or bank notes with the solution to a digital puzzle. This solution must be calculated by a powerful computer and once it has been obtained and verified it can be used in transactions. The process of creating these solutions is called "mining". Around the world (usually where the electricity is cheap) you can find buildings full of computers working on solving these puzzles and adding solutions to the blockchains of their owners. They are literally making money. The mining computers also host the blockchain servers that underpin the currency, recording the movement of the digital cash using blocks in account blockchains.
It's possible for you to start with no digital money, run your computer for a while, generate some currency of your own and start spending it but a quicker way to get started is create an account with a broker who will exchange your digital currency into old-style cash and back. You use a program that acts as your "digital wallet". Once you have signed into the program you can use it to give other people your digital cash or ask your broker to move your money in and out of the digital domain.
The problem with a digital currency is that it is not underpinned by anything. If you look carefully at a British banknote, you will see that written on it is the phrase "I promise to pay the bearer on demand the sum of x pounds", where x is the value of the bank note. In olden times each banknote was backed by gold. You could go into the Bank of England and ask them to exchange your pound notes for lumps of gold from the treasury. We moved off the "gold standard" a long time ago but the principle remains. The UK government stands behind your wallet. The Bank of England works to make sure that the pound has a particular value of itself and in relation to other currencies. It is unlikely that all our pounds will suddenly become worth a lot more or a lot less. It has to be like this otherwise nobody could do any business.
No such safeguards exist for digital currencies. Massive speculation can (and does) cause their value to skyrocket and then plummet. Digital brokers can vanish taking their customer's money with them. If someone finds a bug in the software that implements the currency the whole thing could disappear overnight. Investing in a digital currency is not without risk, to put it mildly.
Bitcoin is the most popular digital currency. It's been going since 2008. You can buy bitcoins, or parts of them and use them to pay for stuff or as an investment. They are never going to replace proper money though. One issue is that the time it takes to complete a transaction (create a block, add it to the blockchain and replicate it over multiple servers) is around 10 minutes. So, by the time you'd managed to pay for your cup of coffee using a bitcoin it would be rather cold.
Another popular digital currency is Ether. This currency is underpinned by an open-source framework called Etherium. Blockchains stored in Etherium can also hold transactions managing Non-Fungible tokens or NFTs. So, what is a non-fungible token?
The word fungible means "interchangeable". If I buy a batch of bricks to build a wall all the bricks will be the same size and shape and I can use any one brick in place of any other. My bricks are fungible. If I want to make unique bricks (perhaps for a wall of remembrance) I could carve a different message on each one. Now I can't swap one brick for another without changing the wall. So, a non-fungible token is one that can be proved to be unique.
If you think about it, it would be quite easy to copy a "non-fungible" brick. You'd just have to create a new brick with an identical message on it. However, when the Etherium system creates a non-fungible token it makes sure that the new token is unique within the Etherium universe. The token can then be moved between owners using transactions that are stored in a block chain by the Etherium system. I can purchase a non-fungible token by using a broker to get some Ether funds and use them to buy it. The transaction is stored in an Etherium blockchain and I can use this as proof that I own that non-fungible token.
Owning a non-fungible token sounds like it might be fun, but it gets real when we link the token to something else. One of the problems with the digital universe is that it is very difficult to maintain and manage "ownership" of an asset. You might have created a photograph or piece of music but once you put it into the digital domain it is very hard to stop people taking copies for free. And when you do find someone who has copied your work it is also hard to prove that you're the original owner.
The Etehrium system lets you bind a non-fungible token to a digital asset (which could be a document, a picture, a music track or any other data file). The binding process generates a transaction in a block chain managed by Etherium linking the non-fungible token with the asset. We can then create another transaction that records the purchase of the non-fungible token by the “owner” of the asset. This allows the owner to say "I own this". The digital asset can still be copied, but at least the owner has a a way of proving they have been wronged and claiming some recompense. An owner of a non-fungible token can sell it to someone else, which generates another transaction which is added to a blockchain.
So, at this point we have currency system which operates outside the "normal" banking space and a way of digitally conferring "uniqueness" on things and proving ownership of them - at least within the Etherium system itself. And now human nature can take over. The first thing that happens is that a lot of people pile into the digital currency arena and push up the value of everything. This does not mean that the digital currency has any inherent value, it just means that lots of people think it has. The second thing that happens is that people start assigning non-fungible tokens to anything and everything and an industry springs up generating things that have no value except for the fact that they have unique non-fungible tokens assigned to them. Remember that owning a non-fungible token that represents an item doesn't give you any control over that item, it just means that you can brag about what you’ve got and raises the vague possibility that in a perfect world you might be able to get some royalties or perhaps sell the "ownership" to another person in the future. Someone compared the whole thing to "selling plots of land on the moon" and I can see their point.
And here we are. Apparently, London tube stations are full of adverts offering the chance to join this new revolution. I can see why people might be interested in getting involved. In a world where if you play by the rules, work hard, save and do all the right things you still can't afford to buy the house that you want (even though your parents and grandparents managed to get theirs quite handily) you might feel that you deserve a short-cut of some kind. And perhaps the early adopters will do quite well out of it. But I worry that time has already passed.
It might be fun to buy non-fungible tokens directly from an artists who’s work you really admire, but to be honest I’d rather go down to the Ferens Art Gallery open exhibition and buy something physical to hang on the wall.
I’ve decided that I really want to do this. If I take a camera or two I think that my desire to get a photograph might able to offset my fear of heights.
You know you’re getting old when your blog starts to fill up with recommendations for coffee shops.
Anyhoo, The Old Lamp Room in Cottingham is lovely. It is right by Cottingham station. In the building where they used to prepare lamps for steam trains. We had a drink and a scone and were able to sit outside and watch the trains go by. Great place. The food menu looks good too.
I've spent a lot of my time teaching C#. And the starting point for my students was always an empty console application. Something like this:
using System;
namespace OldSchoolConsole
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
This is what you used to get when you created an empty console application in Visual Studio. It brings in the System namespace so that you can interact with the user and then creates a namespace and a class containing the Main method that makes everything happen. (in this case print "Hello World!")
However, if you use Visual Studio 2022 and .NET 6.0 to create an empty console application you will get this:
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
The link in the code gets you to a description of what has been done and the C# features that make it possible. I can understand the reasons for the change. You can run a Python or JavaScript program from a single statement and so someone must have thought that C# needed that feature too. However, I'm not convinced that the change is a good one.
I really liked the way that the old arrangement forced the reader to consider the way C# programs are structured and managed. My C# Yellow Book makes a big feature of going through all the statements in a complete program right at the start, so readers appreciate how C# programs fit together. The new single line arrangement might give the impression that I'm doing stuff that is unnecessary and making things complicated when I'm really paving the way for understanding of how everything works. The new design doesn't really make it easier to construct programs. If you want to use classes in your simple one-line program it all falls apart with build errors that make little sense to the beginner.
The good news is that you can just delete the one line solution and go back to the old program if you want to. Which is what I plan to tell people to do.
I’ve just decided I’m wrong here. If I think about the issue properly (something that only ever seems to happen after I’ve posted an article) I reckon that the new console format is a good idea, especially from the point of view of teaching programming. When I wrote Begin to Code with C# I invented a framework (called Snaps) that makes it trivially easy to create a universal windows application with a minimum of surrounding code. This change is doing exactly the same thing for console apps.
My argument above doesn’t point up a flaw in the new design, it points up a desire on my part to keep my teaching sequence the same, rather than look at simplifying the learning process.
I’m now going to re-write the first part of the C# Yellow Book to make use of this new feature and make it easier to focus on what programs do before moving into the features that make solutions easier to manage. My apologies to the .NET 6 team, you’ve actually done something really nice.
Trinity Market in Hull is a wonderful place to visit. Lots of very interesting things to buy and great places to eat and drink. And all indoors and heated. Plus a nicely set up meeting space they use for all kinds of things. Including half-term crafting events for little people. Lovely. Count us in.
The event was organised by Hull Libraries who do some lovely stuff around the city. And in the library. They had coloured paper, feathers, stickers, glue, pipe cleaners and all the crafting stuff that kids (and me) like playing with. Thanks very much for organising it and making one little lady a very happy bunny. Whose happiness only increased when we swung by Dinsdales in Hepworth’s Arcade to buy a joke on the way home.
We also grabbed a coffee in the market from these folks which was excellent and extremely good value. They do very nice de-caffeinated too.
No wonder I look worried
The original Pokemon games kind of passed me by. Perhaps I was a bit too busy with other things when they first came out, or maybe I was anxious not to be seen to be taking over the games that my kids were playing at the time. Well, that ship has well and truly sailed now… So when Pokemon Legends Arceus came along I was tempted. The game seems to have a nice exploration angle and although the graphics didn’t look the best they looked good enough to build a solid atmosphere. So I stumped up the cash and downloaded a copy.
I’ve not done much yet. Just the training missions. But I am having fun, and it looks like there is a lot of depth to the whole thing.
The nights are getting brighter and there are things like this out. Could we be approaching the end of winter? Rather hope so.
We have a house guest for the next few days. Turns out her favourite TV show at the moment is “Boy Girl Dog Cat Mouse Cheese”. You can find it on BBC iPlayer and also on Netflix. Not the most relaxing watch, but fun. And it has cheese in it.
Rob Miles is technology author and educator who spent many years as a lecturer in Computer Science at the University of Hull. He is also a Microsoft Developer Technologies MVP. He is into technology, teaching and photography. He is the author of the World Famous C# Yellow Book and almost as handsome as he thinks he is.