ARM coders are nuts
Pages: 1 2
Malcolm Hussain-Gambles (1596) 811 posts |
Just spent an hour ploughing through the PRM’s regarding events, vectors, FIRQ’s and the like. |
Steve Pampling (1551) 8170 posts |
I’m told it’s over rated. Spending my day doing network support and my spare time1 frequently doing the same2 I think I will just take other peoples word on it. 1 Spare, spare time may sometimes involve being in a pub3 that has a selection of good ales with like minded people 2 There’s an iPhone close by that hasn’t gone “bong” for a few hours, which is a bonus 3 Sadly almost invariably with the above mentioned iPhone |
Rick Murray (539) 13840 posts |
:-( On the flip side, how can anybody stand to be an “app” writer, coding for a virtual machine and a whimsical API with no real understanding of anything that is going on inside? If “year of code” is showing us the future, then god help us all. So nerr, etc.
I think I was born that way. When I was young, my favourite word was “why?”. Not to annoy grown ups (though it frequently did) but because I actually wanted to know. Everything. All at once. I defeated my childproof car seat before my parents figured it out. I could barely walk before I took the record player and eight track apart (getting it back together was more difficult, but hey, quadrophonic sound was overrated anyway!). Fixing washing machines and VCRs was an after school job. Then I went to boarding school and met the Beeb and had entire evenings (and sometimes nights) of free time. |
h0bby1 (2567) 480 posts |
aaaaa |
Malcolm Hussain-Gambles (1596) 811 posts |
Well some people used to use machine code rather than assembly back in the day! |
h0bby1 (2567) 480 posts |
aaaa |
John Williams (567) 768 posts |
Anatomically uncomfortable? |
h0bby1 (2567) 480 posts |
aaaaa |
Rick Murray (539) 13840 posts |
Don’t get me wrong – I write a lot of code in C and BASIC because – as you say – writing and debugging pure assembler is a challenging process for which easier methods exist, provided you are willing to put trust in a compiler and somebody else’s library. We have reached the level where reinventing the wheel over and over and over is… well… a bit dumb. However, I wonder how many modern programmers even understand the machine that they are using. Do they really understand how a computer works, or is their programming the equivalent of using VisualBasic? I have written numerous applications for Windows and I have no idea about how the Windows multitasker works. There was no need, I would just hook code to events (icon click, window close…) and VB would do the rest. The payback for this is all the baggage that is the VB runtime, plus the speed hit that VB applications incur – especially those compiled as P-code. This is why I am glad to have grown up in the days of the BBC micro. Each trace on the circuit board, each logic gate… they all had a specific and clear purpose. You could understand the entire machine in a way that isn’t possible these days. You could improve your ability to program by being able to see the world from the processor’s point of view. Instead, the common approach now is instead of improving the code, improve the hardware. Am I the only person who thinks it is a bit ridiculous to be running RISC OS on a gigahertz multicore processor with a gig of RAM? That’s… mindblowing. The thing is, we can eke out perfectly acceptable performance (say, with OvationPro) by running a single core at its slowest speed. Other operating systems need all that oomph just to get an acceptably responsive UI… |
h0bby1 (2567) 480 posts |
aaaaa |
Malcolm Hussain-Gambles (1596) 811 posts |
I had an interview a few years ago and the guy was amazed he met someone else who knew what context switching meant. |
Rick Murray (539) 13840 posts |
Yes, it still matters because of what is the most efficient on the platform in question. You could construct a word using four byte reads, but a word read is more effective. For loading multiple words, you could chain together twenty eight byte reads and some bit shifting, or you could use a single LDMxx. The problem is, if you are using an arbitrary virtual machine, you don’t necessarily know what it is doing under the hood.
I think that is my PC’s default setting. It’s something of an indictment when it is quicker to do stuff on a mobile phone… That said, I think as each month passes, the distinction between traditional “PC” and “tablet”-like is narrowing. You can get PCs (Lenovo?) that look and feel like tablets. Windows 8 seemed aimed more at them than real PCs.
Been there, seen it, ran away screaming.
I have no idea what “shmiilblik” means (sounds like a Yiddish word), but I like it. Spaghetti code of the sort that poisons the mind of anybody that tries to understand it? Like the Sadako of programming? (click link if you didn’t get the reference, it’s a picture)
Oh hell yeah. I have a copy of the XP API as a big searchable “book” file on the computer I was using at the time and sometimes when looking up stuff, or just reading random bits out of idle curiosity, I’d back up, reread it, and say a rude word in a slow emphasised Keanu Reeves kind of way.
Well, then. That pretty much makes my point. |
Glen Walker (2585) 469 posts |
Sadly I do not…or at least only the very basics. I see this as a weakness and something I plan to correct (which is why I asked for the Pi and some books on low level stuff for Christmas). I have plied my trade for some years now producing GUI programs that are generally several libraries, frameworks and an operating system (or two) away from the hardware yet I feel that all I have managed to do is put on a pretty light show in the corner of a large and foggy room. Its impressive, sure, and serves a useful purpose (mostly) but I can’t help feeling that I am missing something fundamental – something that will make me a better programmer and clear away the fog. Hopefully over the next few years I’ll get the time to do more study and increase my understanding but sadly I know far too many programmers who simply aren’t interested… |
Frederick Bambrough (1372) 837 posts |
That’s surprising. My wife… Boom, boom! |
Steve Pampling (1551) 8170 posts |
yeah, but just image RO using all the power of a multicore device |
Steve Pampling (1551) 8170 posts |
While you learn you live, stop bothering to learn and you might as well stop breathing. |
Vince M Hudd (116) 534 posts |
ARM coders are nuts? Well, ARM was invented by a company called Acorn! ;) |
h0bby1 (2567) 480 posts |
aaaaa |
h0bby1 (2567) 480 posts |
aaaa |
h0bby1 (2567) 480 posts |
aaaaa |
Rick Murray (539) 13840 posts |
Ah, you mean “the known unknowns”, right? ;-)
I think this surely depends upon how you have specified the program? In C it is possible to use “void *” as a placeholder for “could be anything here”, though I have tried to avoid such things myself.
That was back in the days when Microsoft (infamously) figured this whole “internet” thing would never really take off, and it was surely much better for Microsoft to create their own proprietary protocol that they could control… Back in those days, Microsoft’s business plan was to either buy small companies for their product, or to make their own to crush competitors. Look at the history of FoxPro. Look at WordPerfect/AmiPro vs Word. I would even say look at Netscape vs MSIE – Netscape was utterly crushed by IE but sensing the changing of the wind, they ultimately had the last laugh giving Netscape to the world from which Firefox was born, the browser of preference on Windows systems. IE, which was going to have its final definitive release with IE6 (which is why so much ActiveX stuff is tied to IE6, stupid devs actually believed that) has been playing catch-up since and, well, let’s just say that Microsoft isn’t so great with compatibility with niche things (which is why so much ActiveX stuff is tied to IE6, later versions won’t run it, or won’t run it correctly).
You can blame the messed up US patent system for that. It seems you can patent an existing idea by suffixing “on a computer” or “on a mobile phone” to the description. And, it also seems that patents are granted with.. not a lot of attention paid to “prior art”, seemingly with the idea of “let an expensive court battle sort it out”. Unfortunately this means that (within the US at least) programmers have to be very careful of what and how they implement as the large rich companies trade and collect patents to For my own code, I don’t tend to pay much attention to this sort of thing. I figure that if I can think of something then it was never worthy of a patent in the first place, and anyway I’m a European so sod off… I’m not a company, so I have no assets to go after and I’m not a company so I have the flexibility to rewrite some of my website rules to block entire continents if it came to that.
? Why bother burning out anything. Some PICs and 8051 family with onboard flash have a special option that can be set that once a firmware has been programmed to the device, the option can be set (and never unset) which means that the firmware is then only available to the CPU and any attempts to read it will return gibberish.
I’m afraid I would consider code that could accept 123 (as a value) and “123” (as a string) and consider them equal would reduce resilience and increase problems. PHP seems to be built upon this idea and I have hit errors in my own code where something have been interpreted in a way different to that which I expected.
That is an entirely different thing. I think a lot of the zero days and privilege escalations are due to a basic failure to sanitise input. If you write a module (generic module, not a RISC OS module!) to do “something”, then you should never assume that those passing data to your code even bothered to read the API, that they didn’t litter parts of the data with their own magic values, and that they themselves haven’t failed and will be providing bad data (like trying to read past the end of the file but not trapping it because “oh, that will never happen in production code” – famous last words…). You shouldn’t go over the top, there comes a point when the input should just be faulted, but then a module shouldn’t bring down the system because of common case screwups like null pointers.
…would be nice, then, if it worked.
I’m afraid the mentality is much worse than that. HOWEVER, if you flip the argument around, you can ask a very valid question: So as a programmer, one is absolutely depending upon the OS to catch mistakes? What kind of programmer is that?
I noticed. Ugh. |
h0bby1 (2567) 480 posts |
aaaa |
Steve Pampling (1551) 8170 posts |
Code to support a feature currently in wide use. Has known vulnerabilities and is now being replaced by an alternative – various people dropping flash in favour of HTML5 use.
Manually entered or DHCP assigned? :) 1 Ever wondered why organisations like the NHS still hang on to XP and old versions of IE? Some plonkers coded in a way that relied on the security holes in order to work. Anything with the holes fixed stops the business critical applications working. You check for alternate applications and they usually have even older dependencies with bigger holes. |
h0bby1 (2567) 480 posts |
aaaa |
h0bby1 (2567) 480 posts |
aaaa |
Pages: 1 2