On 01/05/2018 09:44, The Natural Philosopher wrote: []> But I would remind you of the possibly apocryphal tale of a yound Gary
My experience, and what also applies to the Raspberry Pi, is that optimisation of the algorithm is the most efficient way of speeding up software, before any consideration of assembler or C or whatever. But choosing a language specifically oriented to the problem in question may be the most efficient use of a programmer's time.
Sure but you ain't got very structured data, doesn't handle input of data very well and you haven't got referential integrity etc.
What you have is a fine way of dealing with lightly structured data which doesn't require a lot of data entry - especially when you add in use of awk and sed. It isn't a direct replacement for the applications I would use a database for, and vice-versa.
--
Andy Leighton => andyl@azaal.plus.com
"We demand rigidly defined areas of doubt and uncertainty!"
So is old code. Unix V7 had obvious security howlers and rather more obscure bugs (dmr had a good page with the latter). Sendmail enabled the first big Internet worm. The reasons we see more vulnerabilities now than (say) the early 1990s is that there is overwhelmingly more software to have bugs in, and more effort put into actually finding them rather than just believing it?s all good without any actual evidence.
As for C, most C programmers don?t engage with the language as actually specified but rather with incomplete models (?I know how it maps to machine code?). Unsurprisingly the result is a stream of bugs. Fortunately more modern langauges have a more robust design.
On a sunny day (Tue, 01 May 2018 10:06:19 -0500) it happened Andy Leighton wrote in :
You are 100% right, There is a slight argument for cat in combination with some utilities as it prevents you from erasing the source if you use the arguments wrong. That has happened to me. cat is always 100% safe.
Yes it all depends, I did see some programs using mysql and really wondered why. For most of those sort applications I just use a ~/.xxx/ directory and make my own format data storage, and if at all possible in readable text format.
I guess if you come from a databeast background then maybe it is the way you are used to doing things. In my view every library used less is a plus. I am not a database guru so... Take this for example:
formatting link
this is running on one of my raspis right now, and all ship movements are stored and can be replayed, But to add to the fun,. it also records a movie of the screen 24/7 so you can also replay that. I am sure the database expert would use a database, and I can assure the data is complex and structured (not a text file, very compressed), and involves GPS position, time, speed, heading, etc for each object. But then again, written in C it hardly took any effort to write the code without database, just a small subsection of the code. There are a lot of sensors too, all logged as well, those logs of the last 24 hours can be diplayed by a simple key press. And it is cheating to use a movie now is it not? But SOOO much better for user experience. Sometimes I just watch the movie from the previous night when I was sleeping, fast forward, any thing out of the ordinary? yes storm warning. And security, this thing is made to steer a ship, and I want no freaking XX code from anywhere causing it to crash any time. root@raspberrypi:~/compile/pantel/xgpspc# uptime 18:45:26 up 12 days, 7:17, 10 users, load average: 2.67, 2.85, 2.92 If it does not work I have dunnit. :-)
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.