|
Gary R. Wheeler wrote: Timing requirements were such that the comments for each line of code included the number of clock cycles required for the instruction.
That reminds me of graphics coding on the original Nintendo.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: That reminds me of graphics coding on the original Nintendo I had another project back in the late 1980's. We found an algorithm for converting a CMYK measured gamut to RGB via interpolation. The gamut was to used to perform fine-grained correction between a scanned original image and the 35mm film we were imaging on.
I was responsible for implementing the essential algorithm in software. I knew the customer eventually wanted a hardware-accelerated version, as the software version took minutes to process an image. I spent several days refactoring the code to emulate a potential hardware implementation. When I was done, the image processing time was under a second, and the hardware 'implementation' only required a few 100KB of RAM for coefficient tables compute from the 'raw' gamut data. I believe an actual hardware implementation would have been usable in real-time. Unfortunately the project ran out of money before we got that far .
Software Zen: delete this;
|
|
|
|
|
So many good ideas left on the cutting room floor because of ruthless beancounters.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: All these little skills I picked up coding in the 80s for getting things done without much to work with
I used to enjoy the bit-twiddling and extreme optimization, too. I still do, when coding for my own enjoyment.
OTOH, we are professional programmers. It is our duty to solve any problem in the quickest and cheapest way that meets the requirements.
Given two options:
- Use a low-powered system. Program it in C with all possible performance-enhancing tricks, with the risks associated with no memory management, etc. Completion expected in one year, with a high risk of delays.
- Use a higher-powered system. Program it in C++, C#, or Java, with powerful libraries and proper memory management. Completion expected in 6 months, with a medium risk of delays.
I would say that the equation of "time to market + risk" vs "development and production platforms" is not one that can be decided by us. In some cases (e.g. small runs or one-offs), the client will opt to throw hardware at the problem, and get a faster (and possibly cheaper in the long run) solution. In others (e.g. high volume production), the cost of the production hardware trumps everything. In still other cases (e.g. a demo for an expo), meeting the schedule is all important.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
I agree with you, and that's normally true that hardware is cheaper than software. The situations is more complicated for IoT devices. They cannot scale out, and sometimes you need their size and power requirements.
I am building something for a client on just such a platform now. Bit twiddling is necessary. They're paying for the privilege of running on one of these little guys. That's how I look at it.
I love doing it too. It means what I used to only be able to do for fun I get to do professionally now.
Real programmers use butterflies
|
|
|
|
|
I remember doing embedded applications and we only had 4K of RAM. That was a real thrill.
So many years of programming I have forgotten more languages than I know.
|
|
|
|
|
4kB is not a lot! That sounds like fun. 520kB seems like an incredible amount in comparison until you add the libraries for the bluetooth, the wifi, the touchscreen, the SD read/write, the HTTP REST client w/ JSON and the Fat32 FS to go with the SD pretty soon it's not much at all!
Real programmers use butterflies
|
|
|
|
|
|
64K of RAM. You were spoiled. I remember using MC6805 processors that had just under 2K EEPROM and 112 bytes of RAM, including stack.
Did some amazing things with this, including a Point-of-Sale dual printer driver that controlled everything, including firing the print head, fonts, 4 different print hardware, bit-banged serial port.
Everything was interrupt driven state-machines to reduce RAM requirements and provide multi-tasking.
I even had to use some interrupt vectors for code space.
It was glorious fun.
"Time flies like an arrow. Fruit flies like a banana."
|
|
|
|
|
well when you start to add the libraries for bluetooth , wifi, the touch screen, the SD, the Fat32 filesystem for the SD, etc that 520kB RAM isn't much, but 112 bytes is insane.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: finally 32 bit Wow, have we got news for you! 
|
|
|
|
|
Okay so I worded that badly!
Real programmers use butterflies
|
|
|
|
|
I have a client that asks me if I ever sleep. He's right to. I only sleep for 4 hours at a time so if you don't live with me it can seem like I'm always awake.
It's one of the reasons I like Brits, the Germans and well basically folks from western Europe. You all are awake when I am and most of you speak English.
I know a little Spanish but that doesn't help me as much as most of the speakers I know are in a similar time zone.
Anyway thank you all for existing and haunting the same website I do. It makes the wee hours more tolerable.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: the wee hours At my age that can mean other things. 
|
|
|
|
|
And several wees at my age.
I'm not sure how many cookies it makes to be happy, but so far it's not 27.
JaxCoder.com
|
|
|
|
|
My trick is to convince my aging bladder and that of my two 8 year old greyhounds that they need to be emptied at the same time during the night.
Software Zen: delete this;
|
|
|
|
|
Yeah I could see where syncing with them would be a challenge.
When i was younger we had a huge male German shepherd and whenever we fed him soft food, alpo he would get gas and it was so bad that it would wake us out of a dead sleep with tears in our eyes.
I'm not sure how many cookies it makes to be happy, but so far it's not 27.
JaxCoder.com
|
|
|
|
|
Hera, our female, has that problem despite the fat-free plain yogurt we add to their food. I've been working from home for the last several months, and I can't figure out how she manages to save it up until I have the door closed while I'm on an online meeting.
Greyhound gas is lethal. I'm convinced it's their version of nitrous oxide.
Software Zen: delete this;
|
|
|
|
|
I'd be tempted to add Gas'x. I think that's the name, to her food
I'm not sure how many cookies it makes to be happy, but so far it's not 27.
JaxCoder.com
|
|
|
|
|
I'm also in the age bracket where "an all nighter" means not getting out of bed instead of not getting into bed.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Or as the saying goes; "it takes all night to do what I used to do all night".
I'm not sure how many cookies it makes to be happy, but so far it's not 27.
JaxCoder.com
|
|
|
|
|
Getting old sucks. All you can really do is laugh about it I suppose.
I'm in my early 40s so I'm just starting. I get new creaks and groans every year, sleep less, can't eat dairy anymore, etc.
It hasn't gotten serious yet, but then if my family history is any indication I won't see 60.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: Getting old sucks.
Nope.
It's waaaaaaaay better than the alternative!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
LOL that's fair. Considering I won't be getting that old I try to look on the bright side. I'll never need a walker or diapers.
Real programmers use butterflies
|
|
|
|
|
Sorry - I hadn't realized you were vitality challenged. Please accept my apologies if I caused any offense or upset: it was not intentional and I will endeavour not to do it again.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|