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.
1. The lounge is for the CodeProject community to discuss things of interest to the community, and as a place for the whole community to participate. It is, first and foremost, a respectful meeting and discussion area for those wishing to discuss the life of a Software developer.
The #1 rule is: Be respectful of others, of the site, and of the community as a whole.
2. Technical discussions are welcome, but if you need specific programming question answered please use Quick Answers[^], or to discussion your programming problem in depth use the programming forums[^]. We encourage technical discussion, but this is a general discussion forum, not a programming Q&A forum. Posts will be moved or deleted if they fit better elsewhere.
4. No politics (including enviro-politics[^]), no sex, no religion. This is a community for software development. There are plenty of other sites that are far more appropriate for these discussions.
5. Nothing Not Safe For Work, nothing you would not want your wife/husband, your girlfriend/boyfriend, your mother or your kid sister seeing on your screen.
6. Any personal attacks, any spam, any advertising, any trolling, or any abuse of the rules will result in your account being removed.
7. Not everyone's first language is English. Be understanding.
Please respect the community and respect each other. We are of many cultures so remember that. Don't assume others understand you are joking, don't belittle anyone for taking offense or being thin skinned.
We are a community for software developers. Leave the egos at the door.
Imagine this: you have a piece of square stock wood: 4x4 say.
You want to cut it so that the square profile becomes an octagon.
So you tilt your table saw to 45o and move your fence across so that a single pass will cut off a triangular corner. You can then pass each side against the fence and voila! (Or possibly violin.)
The question is "how far should the fence be from the cutting edge of the blade?".
I did this this morning: I measured the stock, subtracted a bit under 4 cm, set my fence and cut a test piece.
It was spot on, each of the eight edges was the same length (with marginal variation because the stock wasn't exactly square but close enough) and I moved on.
Except I've been sitting here trying to work out the geometry, and just how I got my number from the original side length. And I have no idea how the heck I did it, because I didn't use geometry, I didn't use a calculator, and it's the first time I've done this. I just went "oh, it's 9.3cm, so I want 3.8cm edges, that's 6.5cm from the blade edge". And I was right.
But it's doing my head in trying to work out how I knew what the numbers were ... and why I was right first time ...
"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!
Kaspersky it's using the heuristic scan, a technology which checks the code behind for the patterns. Some pieces of the code they are used in the malware programs and it gonna say that they are viruses. I remember that once I've created a service to insert some MySql data for wordpress, he said it's a virus, another time used a geojson to draw a map and it was saying that it's a virus when I've added a piece of code to draw for each city a dot.
In my last job, the employer insisted on running some malware detector (I am not able to recall its name right now) that all the time triggered on the system I was developing. So I declared a dummy string variable (and had to make a dummy modification to it to ensure that it wasn't optimized away) to disturb that bit pattern in my code that the virus scanner mistook for a virus signature.
Every few code updates, other changes made the offending bit pattern again reappear in my code. So I had to delete from or insert into that dummy string a few characters to disturb the 'virus signature' bit pattern again. (After a while, I ended up with having two string, commenting out one, uncommenting the other. It never happened that the virus scanner gave me trouble with either alternatives and no other code changes.)
I complained so loudly about this that I was told that the virus scanner could be configured to bypass any given directory, and they could set it up so that the directory where I generated the system during development not scanned. Production versions were generated in another directory, which they refused to except from virus scanning. So several times, the first attempt at production build caused a virus warning, and I had to rebuild after commenting and uncommenting the alternate dummy string. We did not make releases every month, so this was considered acceptable, as long as the daily development work didn't require daily rubbing the virus scanner behind its ear to keep it from biting.
So I have an app that's designed to run on a piece of hardware intended for musicians, who are not tech savvy.
They also use equipment that can produce corrupt files, although that's not exceedingly common.
My software boots and reads an inserted SD card. Currently during this process it loads each MIDI file and scans through its entire contents to determine if its valid before adding it to the list of available files. That way, corrupted files do not appear in the list. It also means I can display more information about each file.
Once loaded, you scroll through the file list with a small rotary encoder (a knob basically for those of you that don't know what one is)
The issue is this: The title screen can take some time to load. It's not terrible with a dozen files, but more than that and it starts to be like "hurry up!"
Couple this with the difficulty of scrolling through a ton of files with just a knob.
I'm thinking this is okay. Basically, don't put 100 files on an SD card. What do you think?
Do not wait for the scan to finish all the files. When one scanned add it to the list and to the screen (scroll in the new ones)
It probably will take more time to finish the scan but the end user will not wait on empty screen
As for the knob - IMHO it is much better than push buttons...
“Real stupidity beats artificial intelligence every time.”
― Terry Pratchett, Hogfather
That's an interesting idea. I'll consider it. My main concern with it is if the list isn't done loading it will be hard to tell when it's done and you've reached the end or if there's more to go. I guess I can squeeze an indicator on there but the screen is very small.
Also it displays only one file at a time due to the size of the screen, and displaying information about each file, so there's no "list" to scroll. Plus scrolling is out of the question for performance reasons the way these little gadgets work.
The indicator is very important for perceived performance - if you can quickly count the files, I assume you can even show a percentage or similar?
Maybe if you detect more than a reasonable amount of files, you can start by displaying a text saying "This will take a long time, do you want to continue" (well, something shorter probably). If you are really fancy, you can start the loading in the background while displaying the message so the time until they react (if they react) is not wasted. If they just insert the SD card and throw it on the table without paying attention - at least it will then have finished loading when they come back from lunch instead of just sitting waiting for them to press the button.
"Click to continue". It's not like saying "no" really means anything they can't express by taking out the SD card. The important thing is that they are told what they can do to avoid it being so slow. Do not expect users to think twice about filling an SD card with old data if you do not tell them the problems it will give.