The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
"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!
A comment by an American commentator got me thinking about this. Basically, he said that there is a tacit understanding between the Russian government and the Russian hackers that so long as Russians aren't affected, they will not be targeted. Now it seems to me that the way that a hacker virus would avoid a Russian computer is to look to see if the Russian keyboard is installed (it doesn't actually have to be used, just installed). Ergo, all American companies & individuals would have to do is to have the Russian keyboard installed, since the virus will first look in the Registry to see that it is there before proceeding with its payload.
Nah, those viruses check the DNA of the computer user through the keyboard, it is well known that the ENTER key is longer because it includes the wireless DNA test probes and devices.
You are doomed if your DNA doesn't show you eat blinis at least one a week.
Of course, having a picture of Vladimir Putin in bikini riding a bear in the web cam vision range has been also proved to avoid any cyber attack. This method is much better as it avoids the problem of not liking eating blinis.
Best to just unplug everything.
Went for car oil change Tuesday. I was only one in waiting area reading a real book. About a dozen others on phones and computers using open WiFi. What could possibly go wrong?
If you can keep your head while those about you are losing theirs, perhaps you don't understand the situation.
Same for me at doctor / hospital lately... even the roommates... noone has a real paper book.
All with phones or even tablets.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
I thought "hey, I don't have a solid design on the generic interface for my video displays because I haven't a clue what all the differences between them are, so I'll write two or three, and then flesh out my general/abstract design based on those, and then backport/refactor the two or three drivers to use the new generalized design"
It seemed like a solid plan. Solid enough that faced with a similar, or even the same problem, I'd still consider this approach.
But whoa... I've quickly turned things into spaghetti and had to untangle the mess and try again.
Now I'm at the point where the coding is like a protracted game of chess. I make a move, take a break, go think about something else. Come back, make another move, go do something else for half the day.
At this rate, it will take me a week to refactor. Part of it is because generic programming doesn't always lend itself to refactoring very easily. There are a million reasons for this, some of which I'm (re)discovering.
I still will use GP. But ZOMG what a mess I made. It's bad enough that I want to blame it on someone else.
I think maybe when I'm done I'll write an article about some of the ways GP can bite you.
Yeah, that structure wouldn't really serve me here, and I don't have events as such. I do have one callback but I try to limit those at this level because program code doesn't live in ram on these little monsters, so no matter how efficient you write it, it still has to load it from flash over an SPI serial interface. Since the code *is* cached it is similar to a cache line issue you'd face in perf tuning for say a modern PC except the cache is terribly small. The same rules apply though - keep your code small, and the locality tight, and excessive callbacks like an event based model get in the way of that here. Not that it's impossible. It's just an uphill battle to make it work efficiently, so you end up losing more than you save here.
I did work out a model eventually but backporting the code to make it work in the new system is a bear. The code was mostly copy pasted for the first three drivers because the goal wasn't to use that in production, but to use it as a prototype to flesh out the design. Well I did that, but I'm questioning whether it would be easier to just rewrite the drivers over the generalized layer rather than trying to port the existing code. Oh well, I'll work it out.
Didn't you write a parser/lexer/n2-B*-LALR-@#D@-tree so a program can do this for you?
Unrelated, but I had an issue this week and I thought of you the moment I found it.
So I had this code.
And the customer called and said, we always need to do more stuff!
And so I opened the code, added more stuff and fired it up for a test run... Only to find that more stuff did not happen.
I quickly found the error.
I had put DoMoreStuff(); inside of the if-statement because that's where most stuff happened, making this like the inverse of the braceless-if-statement-only-executes-next-line-problem.
When I found it I though "this would never have happened to code witch!"
To be fair, I just wanted to get it over with and didn't really look where I was typing.
Anyway, me nagging about your bracing style hasn't been about your bracing style for a long time, it's just something I do now, it's who I've become