@edps
Forum Replies Created
-
AuthorPosts
-
The TP-link switches work well but they can be a real PITA to set up. In my experience you need to carry out the initial setup in an area where you get the best wifi signal, and then move it to its final place.
Most programming languages of that period allowed the programmer to use so-called in-line code. Some such as Pascal allowed Assembler and calls to imported files, while venerable ones like the Commodore Pet used Peek and Poke etc. They built in this facility to allow programs to directly access the underlying hardware or speed up critical sections of code (early primitive Basics were not compiled but interpreted scripts just like today’s Python). The modern equivalent can now be seen with programming languages such as Vulkan that allow direct access to the inner workings of a GPU.
If you think Atari basic formats are odd, you should have been born in the days of COBOL 60.
Despite computers having very limited capability to handle large values and being essentially integer only they soon took over the business and financial sectors. However, commercial and banking transactions had to be capable of handling tens of millions of pounds (shillings) and pence without any rounding errors.
Programmers ingenuity was stretched to the limits, and many non-standard ways of manipulating data were used (including self-modifying code!). Despite COBOL now being most definitely obsolete a survey showed that 43% of banking systems are still built on COBOL, and programmers are still very much in demand. In fact one very venerable ex-colleague in his late 80s still makes a handsome amount of money as a part-time consultant/programmer.
Steam is in the process of introducing a compatibility fix that they claim allows over 1000 games to run under Linux. I think you should probably preface games with ‘old’ as the Wine fix this uses will not fully cover DX11 or DX12 games. Even VMware is unable to handle DX11 which is really annoying as a lot of graphics software now uses DX11/12.
Not of any help, but for future reference never ‘copy’ a Windows VM always ‘move’ it. The act of ‘copying’ tells Windows that it is a new setup, new NIC etc and triggers DRM.
As far as I can see the only practical difference between the two options is in networking. Copying sets up a new network connection while ‘moving’ tries to preserve the old network settings. (Probably means something in a virtual networking setup)
Tippon, unless the code uses the GPIO pins then it will run without issue on a PC (best under Linux as M$ Python has a few quirks). The latest book uses 2.7 – which is a very usable version.
The Raspberry Pi runs under fairly standard Debian. I routinely develop within Mint Linux (because I can use my big monitor) and just copy the *.py file and any dependencies to the Pi. I see no reason why the converse (Pi code on a PC) will not work without issue as I doubt the book uses the Pi’s *GPIO (introduces too many additional complexities).
*GPIO = General Purpose Input/Output which uses interrupts on the Broadcom chip, and is used by wiring up things to the GPIO pins.
As usual it is a trade-off. Provided that M$ somehow produces a C++ compiler that churns out certifiable code then there are great benefits in moving to an object oriented language like C++. e.g. better stability, fewer bugs, and a reduced attack surface.
Although I like C, it is one of those languages with big health warnings. Code has to be rigorously tested to ensure that none strays outside defined behaviour. As a simple and well documented example if a signed integer number overflows then the behaviour in the compiler is undefined. It MIGHT wrap around or even change sign. wiki link It will however, and most dangerously, run with no error messages!
Pascal was actually written as a teaching language. It was also one that was stable and well structured, producing light-weight compiled code. It was amongst the first languages to encompass Object Programming. The compiled code was also well defined with few surprises. This latter is of vital importance as quirky behaviour by the compiler is very hard to either detect or correct, and one of the main reasons that fuzing a computer kernel turns up bugs. However, there is probably little reason to learn Pascal unless you want to emulate a Russian/Ukrainian hacker.
In fact afaik only ADA and the OTOH, CompCert for C are certified for use in the Aerospace industry and other critical duty software programs. I do not know of any C++ compilers that are similarly certified and my guess is that its quirky run-time behaviour and overloading probably precludes its use! (Its all very well having maintainable code, but useless if it compiles into a pile of flakey pastry.)
The M$ development platform was complete rubbish until they poached Anders Hejlsberg from Borland’s Delphi/C++. At the time Object Pascal Delphi was the absolutely best hackers programming language and introduced the concept of RAD (rapid application development) allowing widgets to be dragged/dropped and at the same time built a code template procedure for each widget. In fact Delphi is reportedly still the language of choice amongst many Russian hackers.
M$ appropriated all that technology for itself and incorporated it in the first releases of Visual Studio.
Delphi is still around, but unfortunately outrageously expensive. If you want to just use something very similar for a quick hack take a look at Lazarus the cross-platform FOSS equivalent. I personally prefer object Pascal to C++ any day of the week!
There were one or two on MM who liked C++.. I have to confess that I prefer C as I find c++ bloated, and less easy to use on a Pi.
The £4.99 version appears to be identical (the one in Smiths is the 6th edition, but I cannot see any differences at first glance). Numpy and Beautiful Soup have changed over time, but you should be able to work around the changes (if any). In any case finding out why something does not work is often the best way of learning.
[edit] Just one caution, I’m not sure which Python the book uses. There are two versions currently in side by side use. Version 2.7 and version 3.xx. There are unfortunately some irritating and senseless differences between the two versions such that code from one has to be transliterated into the other. Whichever one the book uses (probably 2.7), stick to it until you are forced to use the other version.
Back to Python and away from the modern insanities of C++!
Re Tippons original post, while browsing around WH Smith I came across a small bookazine “Python The complete Manual” published by Future Press £7.99. This manual covers all the Tippon requeste:
i.e. A Python intro.
b) Building an Android app
3) Making Web apps
4) Scraping (Wikipedia)
5) Games programming
It also covers my hobby oprogramming on the Pi and multi-tasking. There is also on-line access to the included code.
Looks like a very good eight quids worth to me.
(Wheels I suggest you start a new thread on C++ as the two languages are very different)
OK Now I now what happened. It just goes to show that overloading can be easily abused. Personally I think this is a very dangerous area to abuse, and as far as I can see gains little in this usage except a small bit of typing. It is far more likely to result in subtle bugs and malign code.
The address in *pointer (your example) is undefined, so the behaviour is also undefined. The value in APointer is being assigned to an undefined random address.
If the Visual Studio compiler allows this behaviour by default then I think it stinks. At the very least ^pointer needs to be assigned to a defined and initialised variable at the start of the code block. e.g *pointer = 20
int *Pointer = &Avariable
This is wrong on multiple counts:
a) you are assigning the address of a value to an integer deferenced pointer. You are trying to do too many things at once
Pointer = &Apointer
Anothervariable = *Pointer
cout << *Anothervariable
b) If the compiler does not throw an error you are also assigning an address to an int. Typically you need a long or double word to avoid address truncation.
As I said my experience with an FA was not great.
The one area I followed his advice was that of Trusts only to have the Government retroactively change the rules, and cost me both time and money. While I cannot blame the FA, I had guessed that convoluted ways of protecting money from HMRC was liable to get changed, but I did not think the Government would change things retroactively. That experience blighted my view of Trusts and I now prefer to give things to the kids and give HMRC a note saying what I have done so they cannot argue over timing/estate duty.
I trust the EU rather more than I do the bunch of incompetents we have in charge of this country
For example Chris Grayling of Rail Timetable shambles infamy is in charge of Brexit infrastructure contingency planning!

The one comment I’d make is that you also need to have your own view of the economic future of this country and its place in the world (i.e impact on inflation, and Shares).
Use that to second guess what any FA’s say. By mainly ignoring the FA’s advice I avoided both losing half my money in the Equitable Life crash, and also to the Dot.com crash. This view is also valuable when it comes to making a decision on whether or not to pay off your mortgage.(First thing I did, and one of my better investments, but it is an interest rate/personal circumstances dependent decision)
Take your own view of the Stock/Share market. Now could be a very risky time to invest. Warren Buckett is still betting that the stock market is soon due for a crash, but to be fair he has been saying that for two years. He is also betting that Brexit will be a disaster for UK stocks. i.e DO NOT LOOK AT PAST PERFORMANCE AS A FUTURE PERFORMANCE INDICATOR.
From the foregoing you can tell that my personal experience of FA competence is at best mixed and contrary to that of Dave. If you are not careful the FA’s ongoing fees can skim off all the upsides on your investments and just leave you with the risk. If you must use an FA look VERY carefully at the benefit of a one time fixed payment for services versus him skimming long term off your investments.
FAs are like all professionals: a mixed bunch, some outstanding and some you should avoid like the plague. Good luck with your choice!
I cannot comment as it is many moons since either myself or sons learnt C. At that time we were overseas where text books were much cheaper than here, and we loaded up on books written by an Indian gentleman (I cannot remember his name unfortunately). I do not remember much circularity in the learning curve. That however was in the dark ages before IDEs and ‘visual’ programming.
In these days I think I would need to spend time getting to grips with the IDE and gui design using a bare modicum of C before getting into the more difficult aspects of C Perhaps this may be the reason for your complaint.
Other things such as the relationship between pointers and arrays need you to be familiar with both, before ‘jumping back”. Ditto function pointers etc., or horror of horrors — self modifying code!
Why is there no easy way to rename a project from within Visual Studio ? I just noticed I named a small experiment “FeaderFiles” instead of “HeaderFiles”. Not really a problem this time but annoying.
Probably a Windows ‘History’ quirk. As most of my code is exploratory in nature (i.e. I really do not fully know what I’m doing), I will quite frequently branch into a direction then weeks later realise that it was a blind alley and have to jump back some steps. That is when historising helps, and I guess needs a ‘constant’ file name to do so.
-
AuthorPosts
