It was listening to debug on an embedded controller. I rebooted Windows and the serial mouse detected by Windows from the embedded system's spam managed to close down the debugger by clicking on the close button....
Posts made by mike_james
-
RE: Serial Mouse Still in Windows 10 [Trigger Warning: Disabled]
-
Serial Mouse Still in Windows 10 [Trigger Warning: Disabled]
Who needs a time machine when you have Windows 10?
An external device chattering away into a USB virtual comm port when you boot Windows 10 can get seen as a serial "Microsoft BallPoint" mouse.I was wondering why somebody was mousing around my desktop and randomly clicking on the windows.
Or are they just rebadging Windows 95 again ?
FFS.
Its a known problem with older Windows .. and this also describes the fix..
-
TDWTF lightweight pedantic WTF
Every time I visit the main TDWTF article page, it is still copyright 2014.
It is about to become October 2015. .. only a small WTF but still a Daily WTF. -
RE: Get rid of old technologies!!!!!!!!!! Blakeyrat is an idiot for even attempting to use this forum
I want to produce a replacement for cheques - based on the B Ark currency in the Hitchhikers Guide to the Galaxy, as invented by the accountants ...
Take a digital image of a leaf with lots of veins in it. Produce a hash of that image file.
Assign a currency value to the leaf based on the hash and send that to your bank.
Send leaf to recipient. They perform the same imaging and hashing functions and contact the bank. If it matches, they have recieved your leaf and can have the currency transferred to them.Beats pratting around with FPGAs to make Bitcoins which will probably totally vanish when every single one has been created as a final joke.
-
RE: We have an IC department (they dropped the T)
Actually, just use the position as a springboard to find a better job.
-
RE: We have an IC department (they dropped the T)
Another route is what I ended up doing. I installed a copy of Windows Server 2008 inside a hyper-v VM running on a networked Windows 8 Professional PC that I hate because of Windows 8.
I then have admin rights on that and for historical reasons, I installed a Subversion server (one of the Collabnet installations) and a MediaWiki Wiki.
I could have installed a Linux VM.
So what you end up doing is create a virtual PC network inside a PC which meets your requirements, then get everybody to use that for revision control.
Forget the Cloud. Clouds rain on you and dump your data in Puddles.
-
RE: Driving Anti-Patterns - Necro Edition
I believe the guys in the Netherlands also removed the kerbs so that pedestrians and traffic were mixed, The result was that vehicles drove more carefully and pedestrians took more care.
It is also while in the UK we have the mini roundabout which is like a 4 way stop but with the main rule being someone in the junction has right of way rather than based on order of arrival. It is designed to confuse people and make them stop and think before driviing on.
And I liked I-905 in LA . It made me feel right at home just like the M25. Just bigger. much bigger.
-
Long Life bug : Do not use the letter 'j'
I am working on a legacy application, coded in Borland C++ version 5, and using Microsoft CAB files to deliver compressed 'directories' of files used in product label and document printing. The entirety of this is a WTF and is being replaced with C#/.Net
These labels and documents are effectively mail-merged documents but their layout varies widely based on the content of some of the fields, and the design of the label on the product. As most mail-merges use fairly fixed formats, a custom application was created.
Most of the time if you wanted to show a complex label or document with a lot of text, the easy way out was to make a .BMP of the label with most of the text and simply overwrite the variable part of the text on top of blank fields on the bitmap file which was rendered underneath the text of the document.
Recently I decided to produce a legal document using the system - a warranty form with disclaimers. Instead of going the .BMP route I decided to format the text using the text formatting primitives.
The text started "Subject to the above ..."
Every time I printed the form it printed the word "Sub" and then a big blank space.
A lot of headscratching later and I found a C/C++ statement hidden in the CAB file decompressor interface
if (c == '\n' || c=='\j') { /* process end of line */ };
What makes this one truly epic is that according to the guy who wrote the code 10 years ago, the bug was in the first version of the code, and every user of the code managed to avoid the lowercase letter 'j' in any printed text constant.
-
RE: Oracle has no service startup code for Linux
Non-serious reply:
The real reason is that the uptime on a Linux system is potentially so long that the scripts almost never need to be run. So you dont really need them.
In fact you simply switch it on, manually start services ...
Then sit back and feed it power, cool air and swap in new drives in the RAID array, and batteries in the UPS when they are needed, and clean out the air filters from time to time .
If it were Windows based you would need to turn it off and reboot every time Microsoft pulls support for the version of Windows it is running. And about twice a week to keep the kiddies out.
-
RE: Win8
When I started work in 1984 you turned on the computer, waited a few seconds for CP/M to load and then you typed the name of the program you wanted and it started running.
In 2013 you turn on the computer, waited a "few" seconds for Windows 8 to load. Got to the screen of useless tiles, and then you typed the name of the program you wanted and it started running.
As the French put it.. Plus ca change plus la meme chose.
My employer gave me a shiny,fast 6 core 16GB Windows 8 machine. It is only ever used to host a development Server 2008 VM . The keyboard and mouse are jammed out of reach into a bookshelf beside it.
Set the power profile to never turn off and get on with actually being able to use Windows 7 on my crippled old PC.
Waiting for Windows 9 and the sacking of the Windows marketing droids who have wrecked a fundamentally good OS by giving it a user experience which works great with hand waving at an X-Box with Kinect but is not any good for doing lots of things.
-
RE: Apparently, the Linux kernel isn't important enough to bother with a backup
I want to insert a Torvalds-style rant here about risking (even temporarily) something like the Linux kernel on unreliable tech, as a reflection of the scorn poured on ARM SOC developers. but I will leave that to the readers imagination.I do not trust SSDs .
I use one as a swap drive on a too-small dev machine and it falls over repeatedly if used too much for read/write operations.
But I have worn out spinning disk drives in under a year overheating them in too-small boxes.
I once dropped my main backup drive 20cm onto a wooden floor while it was running and enquired into the cost of recovery, so I got interested in backups and RAID arrays.
As far as backups go - why bother with RAID 1 when for 50% more cost you get RAID5 ?
At home I have a 3TB RAID5 server with a separate external 3TB incremental backup drive made out of an old made-in-good-ol-USA dual-CPU Dell Poweredge 600 (really thick sheetmetal, clip on PSU, lots of big slow fans) chassis which began life about 10 years ago on a City trading floor. It eats a moderate amount of power but keeps the living room warm.
I was given the PC, the RAID controller cost $50 on eBAY and the three 1.5TB disks cost about $500 at the time.
My kids are always amazed that nobody else at school has a home server with all the media and documents stored centrally.
-
RE: Found plugged into a coworker's PC
I use two of these twisted pair messes with cat6 ethernet cable to run a pair of 100 megabit links to the uplink (x.y.0.0/24 subnet) and one of the downlink ports (x.y.1.0/24) on one of my wireless routers so I can run uPnP / bonjour type protocols with wireless devices which use UDP through both the wireless routers, the router refused to allow UDP through.
And I cant stuff any more of the stiffer Cat6 cables through the trunking without the top bursting off.
-
RE: And some say FOSS sucks
The learning curve for FOSS often feels like it starts somewhere about 20 feet off the ground , and you often fall off the stepladder trying to get on it.
And the best FOSS is things like Apache where enterprisey IBM people decided the money was in support so they fed 120 manyears into the open source project to give them a product good enough to support.
-
RE: Requirements
We used to call the gradual response to requests the "marketing low-pass filter" when we designed chips.
-
RE: C# method, written by the 'senior' dev
@keigezellig said:
@Anonymous Cowherd said:
protected override void ProcessSomething(string filename, long lineNo, MyDomainObject myDomainObject, ref ReturnCodeObject result)
{
string originalText = myDomainObject.originalText;
int textLen = originalText.textLength;
....Another WTF (or just a copy pasta error): This won't compile. To get the length of originalText you must use originalText.Length, something a 'senior' developer should know....
No, the textLength value is the length of the text without counting any commas .. He has extended the string class...
-
RE: Movie suggestions?
One possible reason for offering films in 3-D is that it involves more faff to film the screen in order to make DVDs of the film.
The best bit of a version of "I Robot" that a friend bought in Hong Kong was the transcriptions of the mis-heard and misunderstood dialogue as Ingrish encoded DVD subtitles.
-
RE: Microsoft Surface - WTF?
@Mo6eB said:
@mikedjames said:
I have a Compaq TC1000 from about 2003 - still works - ... http://en.wikipedia.org/wiki/Compaq_TC1000
Pretty feeble processing power ... and a DETACHABLE KEYBOARD.
I really miss touchscreens that were made to be operated with a pen, instead of a finger. You could do things like write on them or click small buttons and so on.
Except on the TC1000 the lag is so bad you cant easily write on it :-). The digitiser is only running at 9600 baud if I remember right.
I am sure someone will break into the Surface using loads of University Computer lab tech, and discover something like the Windows 98 "all authentication keys are valid if they are divisible by 7" hack.
-
RE: Microsoft Surface - WTF?
@Mo6eB said:
@mikedjames said:
I have a Compaq TC1000 from about 2003 - still works - ... http://en.wikipedia.org/wiki/Compaq_TC1000
Pretty feeble processing power ... and a DETACHABLE KEYBOARD.
I really miss touchscreens that were made to be operated with a pen, instead of a finger. You could do things like write on them or click small buttons and so on.
Except on the TC1000 the lag is so bad you cant easily write on it :-). The digitiser is only running at 9600 baud if I remember right.
I am sure someone will break into the Surface using loads of University Computer lab tech, and discover something like the Windows 98 "all authentication keys are valid if they are divisible by 7" hack.
-
RE: Microsoft Surface - WTF?
I have a Compaq TC1000 from about 2003 - still works - ... http://en.wikipedia.org/wiki/Compaq_TC1000
Pretty feeble processing power ... and a DETACHABLE KEYBOARD.
-
RE: In 2076 we will be able to put 3GB files on 2GB flash drives
Its not just a journalling filesystem or its absence which causes problems, but also not using FAT formats...
...
Way back we spent time building embedded Linux systems and we used to get an incredibly short lifespan in some cases using USB flash keys or SD cards.
Sometimes only days before they became toast. (Some would live longer though)
Eventually we realised that the failures was when they were not FAT formatted but instead some other filesystem format. Quite often reformatted as FAT they would start working again, or would come back with only half the quoted capacity remaining available.
So we started looking at this problem and realised that there are patents from the likes of SanDisk on using the fact that every sector on a flash drive has some additional space for error correction and also some spare 'free' bytes. The 'free' bytes are used in some of the patented schemes to help manage write-levelling for FAT file systems, to stop wearing out some sectors faster than others.
If you dont use FAT the controller in the card or USB key gets confused.
Our problems went away when we simply made a big (FAT) file in the FAT file system and then mounted that file as a 'disk drive' and formatted the file with whatever Linux filesystem we liked.
If you look at Linux based system recovery USB keys this is what they do.
So formatting a USB key as NTFS could lead to complete and rapid failure even if you obey the blinking light and correctly perform the safely eject hardware dance.
-
RE: Guaging Knowledge via the Ternary Operator
@North Bus said:
@Tyler said:
@PJH said:
@kraagenskul said:
and I find you can guage a coder's skill based on their not using it wherever and whenever possible.
FTFY. HTH. HAND.There's nothing inherently wrong with the ternary operator. Just don't be a moron and:
a) nest it
Yeah... I've recently had to deal with far too much of the following:
<font face="Lucida Console" size="2">nresetDN = (divSel==3'b000)?((div2N[9:0]==10'h000)?1'b0:1'b1):(divSel==3'b001)?((div2N[10:0]==11'h000)?1'b0:1'b1):(divSel==3'b010)?((div2N[11:0]==12'h000)?1'b0:1'b1):(divSel==3'b011)?((div2N[13:0]==14'h0000)?1'b0:1'b1):(divSel==3'b100)?((div2N[14:0]==15'h0000)?1'b0:1'b1):(divSel==3'b101 )?((div2N[15:0]==16'h0000)?1'b0:1'b1):(divSel==3'b110 )?((div2N[19:0]==20'h00000)?1'b0:1'b1):1'b0;</font>
Just a single case statement and/or some well-applied white space would solve so many problems.
I'd give the (now gone from the company) programmer applause for writing one of the most unreadable lines of code I've seen in quite a while, though.
This code looks like Verilog hardware code, and a case statement might have lead to strange hardware when it was synthesised into a load of logic gates, using a dimwit logic synthesis tool.
-
RE: Tell me if this is acceptable or if I'm overly sensitive
@CodeNinja said:
A little sensitive.
Of course, I just helped some of my coworkers fill another coworker's cubical with 600 balloons, so...That's ART.
http://www2.mcachicago.org/tag/half-the-air-in-a-given-space/
-
RE: The "Cloud"
I like to think of the Cloud as a one place where you keep the data, it drifts around, some sunny days its not there at all .. and then on bad days it dumps on you.
(this is written from the viewpoint of the UK..)
-
RE: This is the error message you decided to go with? Wait a minute, THIS IS AN ERROR!?
Try it for an example with a scratched CD-RW. When it fails to complete a burn with the volume on the speakers turned up, your wife will ask questions or raise an eyebrow at least... happened to me.
Actually once I got used to ImgBurn , the fact it burns blu-ray and does lots of other tricks without asking for $100 'upgrade' sold it for me. So much I gave the writer some money.
But then I think taking the engine out of a VW camper, fixing it and putting it back is fun, even in the rain...
-
RE: The 44MB getter
In c++ I could imagine a nightmare where the array[stuff] operator is overloaded with some code which allocates memory to ensure the array-like access never fails ... and nothing ever releases it again ...
-
RE: Building security
Signing somebody in to a building means that the company is accepting some responsibility for that person.
As you cant explain to a baby e.g. how to leave the building in the event of a fire, they dont want that responsibility.
And its always easier for a security grunt to say 'no' than work out a rational solution.
It would seem based on G4S in the UK that in fact for many of their "trained and vetted security guards" the only English word they can say is 'no' as in 'no I wont bother coming to work at the Olympics'.
-
RE: Windows 8
And even better -
if you slide Metro off to the left eventually you get to a page of disorganised legacy application and settings icons orphaned on the desktop.
It felt to me like some git had stuck a sticky label over the Windows Start button when you finally get to a proper desktop, that flips you back into Metro.
At least our VB6 application still works on the Developer Preview.
Roll on Windows 9 where hopefully sanity will prevail over marketing crap.
-
RE: Sometimes you have to admire the ingenuity
Apart from previous example not actually using the sizeof(x) macro,
I can think of the [nightmare] pSOS operating system where if you asked for an object whose size was just under 64 bytes, and you had not preallocated a pool of 32 to 64 byte objects, the call to malloc(45) would return 0.
If you had a preallocated pool of 128 to 256 byte objects with a free item then on the same system a call to malloc(128) would return a valid pointer.
Perhaps the user was trying to get around something like that with the definition.
-
RE: Train wreck
I chose Netscape email as a part of Netscape Navigator, and have been getting progressively more and more locked in as time goes by....
At least hiding in the stupid cryptically named directory trees are big mail spool files you can dissect and reassemble on a new installation. But of course the folder names will be different on the new PC unless you go hacking inside Thunderbird's setup files.
Simple folder export jobs that you need to do with a new PC or when you give a family member a PC so their mail sub-folder needs to be moved to a different machine and become the main mail folder are mindlessly hard in Thunderbird.
Its almost as stupid as Adobe Photoshop Elements Catalog files which hold picture tags and from which you cant simply export an empty catalog with all the picture tags preserved for the next year's worth of media. But as I paid money for Adobe Photoshop Elements I can moan. The last time I paid money for Netscape was the CD of Navigator 4.5 AFAIR.
-
Just move that file link.....
Recently I managed to screw up my file server.
Scenario - 2TB Debian linux fileserver using LVM and a pair of 1TB drives. eSATA 2TB backup drive. About 75% full of media (recorded TV etc)
I had two directory trees. one /home/public and the other /home/media. Inside /home/public there was a symbolic link to the /home/media directory, so users accessing /home/public via SAMBA could see the media files.
The server started to misbehave. Smart Disk utilities reported nothing wrong with the main drives. It looked like access rights problems (prompted actually by a DNS foulup where you used to require the local host name attached to 127.0.0.1 in the /etc/hosts file and then a later version of the DNS server I was using gave out conflicting name resolutions because the local host name was attached to 127.0.0.1)
So I deleted the symbolic link and moved the /home/media file tree to /home/public/media. But I forgot my incremental backup now had a complete copy of the old media file tree in yesterdays backup , and now a whole new file tree in a new place in todays backup. At this point it totally filled the backup drive and backups stopped.
But I didnt notice because the server kept on going....
And then one of the main server drives started to slow down. Then the machine wouldnt boot. Then the Smart tools told me the hard drive had died.
And the last completed backup was two weeks earlier......
-
RE: Short and Sweet: Steam's Schrödinger's messages, and dishonest lying liars who lie
At home, we call this type of food "dead things in gravy" or "muck from the sea" - as offered by holiday resort hotels all around Europe.
-
RE: Over packaging
I once ordered stuff from a PC store about 10 miles from home.
Courier came when nobody at home.
Collected package from courier depot which was 15 miles from home.
Drove past PC store on the way to the depot.
PC store was open.
-
RE: "Unfair advantage"
@SEMI-HYBRID code said:
@dhromed said:
@PJH said:
Glass cutting boards tend to have 'feet' on the corners, so they could bend:
Glass that bends?
and it also flows, but extremely slowly, that's why old windows are thicker on the bottom == deform the image when looking through them
A laptop screen can bend quite a lot before breaking. Just try pulling the screen open by one corner and watch it twist.
And fibreglass reinforced skis , archery bows and boats are all examples of glass bending and stretching.
You can push the middle of the glass chopping boards onto the work top easily.
-
RE: Are there any good hard drive error checking utilities for Windows 7?
I think the answer to the question is Windows 7.
But on the subject of Linux and NTFS, I gave up on it because while it worked perfectly on Linux (at least in 2011..), as soon as there is some slight corruption caused by e.g. power cycle without dismount , you can no longer create new files.
You can recycle old ones into new ones, but the total number on the drive remains fixed.
I was using a 2TB WD formatted NTFS out of the box as a backup drive connected via USB2 so I could move it to a Windows machine to recover the files (using rsync backups) if the Linux box failed.
But because of the NTFS issue the backup failed after a while - I had to keep on reconnecting it to Windows and running scans on that to correct the problem.
And because it was USB and the motherboard had a bad USB2 controller, It would take more than a day to do an incremental backup of the day's files whenever I loaded a few gigabytes of photos from the camera.
So I switched the drive to an ESATA enclosure and formatted it ext2. Because you can get an installable ext2 mounter for Windows NT and later http://www.fs-driver.org.
Benefits - doesnt silently go FUBAR . Incremental daily backups happen in less than an hour
-
RE: Double-checking a deterministic process
@AndyCanfield said:
As I recall, the Space Shuttle ran four computers. Three of them ran identical copies of a shuttle control program developed by one vendor, and constantly compared outputs. The fourth ran a copy of a shuttle control program developed by a competitor vendor, as a backup system in case at least two of the first three failed.
Considering the horror stories about power plants these days, I like hearing that the Koreans are paranoid. One ought to be paranoid. Somehow deterministic processes don't seem so deterministic as they used to be.
And those computers kept it on the ground AFAIR, when the fourth one came up with the right answer but at a slightly different time..
-
RE: All because I dropped a box in the garage.
Not quite random. But sleep deprived.
Had spent most a night evolving strategies in my head for getting my 1974 VW camper van fixed in time for a drive to a VW show next Saturday.
Answer after hours of thought = take it to the local VW expert.
-
All because I dropped a box in the garage.
I suppose thats a reasonable title for what happened to my home server.
This server is a Linux box hosting amongst many other things, a little server daemon which takes the output of a marine VHF AIS data receiver incoming on a serial port, and relays it to as many telnet clients as wish to connect.
It sits on port 8080 on the firewall. If you connect to it then it simply spits out a sequence of timestamped NMEA strings as they are picked up from the ships in the harbour near my house.
I forward this data to an AIS service (AISHub) which then uses the data to provide shipping maps.
The daemon occasionally goes around checking for zombie TCP/IP connections and removes any server threads dealling with these.
This had accomodated the behaviour of the client at AISHub which would connect and then disconnect if it got no data after a few seconds.
When the power fails on the AIS receiver then the no data disconnect-reconnect sequence ticks along nicely.
AISHub occasionally change their client software without telling anybody... and then this happened.
The other day I dropped a box on the power cable to the AIS receiver. It turned off. As it is in the garage I didnt notice the LED on the front had gone off.
Two days later the Linux server went strange. Served up blank web pages, failed to accept any files copied to it.
Checking the LVM partitions showed the system partition was full. Checking the logs showed the system and user logs were filling the disk partition - 5 gigabytes of error messages....
These showed the external AISHub client was now reconnecting every few seconds without dropping the previous connection when it failed to receive data in time.
So the daemon couldnt kill the old connections because they were still live.
Eventually the system ran out of file handles and following that the system log was gigabytes of 'no more file handles' errors.
Deleting the logs, reconnecting the power to the AIS receiver and restarting the server seems to have made the system stable.
Now I think I need to insert a policy to limit the number of simultaneous connections from any IP address to some small number nearer 1 than 10000.
-
RE: Rental Electrician
In the UK they went for the 'ring main' which is really two wires in parallel to save on copper when houses went electric. I think it was due to not having any money to buy things after paying the US for ships etc after WW2.
Rather like Ethernet which began using rings rather than stars when it all went down coax which was expensive (lots of copper) before switching over to phone cables (cheaper) in star topology
-
RE: GPU Fan
I did this more simply recently - I fitted a new fan and plugged it into the SPDIF audio socket on the GeForce card. It took a bit of force but went in no trouble.
One new video card and fan later all was good.
-
RE: Interview question for offshore position
No, the phone interview experience was with NXP Semiconductors - we wanted a contractor to help with some Linux device drivers a few years back.
The guy we ended up with actually was a major writer of a file system (squashfs) used in many embedded linux platforms.
And my offshore oil experience was OBC survey on ships in shallow tropical seas or the Caspian Sea with long boat transfers.
.
-
RE: Interview question for offshore position
When your expert friend offers to take telephone interview for you to help you get job, do not answer your phone first if you have different sounding voices.
Get him to answer the phone first or the interviewer will be left in no doubt of your split personality.
This really happened while trying to me while trying to recruit an offshore candidate - one voice answered as Mr X and then got flustered when he realised we were the interviewers.
Some silence and a short time later a different voice came on the line claiming also to be Mr X who succesfully handled the interview.
We gave the job to somebody who could come onsite for a face to face interview.
And if you are recruiting into the offshore oil industry the questions regarding an offshore placement "are you scared of boats" and "do you get seasick" are quite good ones....
-
RE: Android Positioning API WTF
Point taken about the provider check. Apologies.
Maybe I should focus more on investigating the Galaxy SII Samsung/Broadcom GPS implementation, which is giving 0,0 positions - shows up as a problem even in Google Maps, and other applications.(Navionics marine charts, Open StreetMap, Sygic GPS navigation all show the same jump to 0,0 with poor GPS rather than a fallback to cell ID based positions..)
Somewhere somebody has taken the GPS 'invalid position flag' and mapped it onto something that looks like a valid position.
But I was looking at the source of a simple GPS yacht anchor drag alarm and this used the lat=0, long= 0 position as a means of detecting 'no fix' .
Its not a very sophisticated app, but it shows that other models of phones also show the 0,0 problem ...
http://code.google.com/p/anchor-alarm-free/source/browse/trunk/AnchorAlarm/src/com/nickthorneltd/anchoralarm/AnchorAlarm.java
-
RE: Android Positioning API WTF
Before launching US carrier attacks, the phone is an O2 (UK) branded GT19100 model.
-
RE: Android Positioning API WTF
I think that the problem is that there is a lot of information in the location class regarding a successful position fix, but nothing in the location class saying categorically 'This device really does not know where it is', or 'this device just used Cell ID to position itself, not GPS'
Basically they handle failure by denial.
Because of the way GPS calculates position, the chance of latitude and longitude being being exactly 0 at the same time is almost 0 . So next best is for app writers to filter 0,0 positions as bad.
Secondly for position jumping :
The problem with a GPS in your pocket or on your body is the antenna only sees a part of the sky. Small errors in ranges to satellites tend to provide a position fix that averages to being along a line rather than a point. (you lose ranges that cancel out the error coming from the other side of you) If the GPS is in the middle of your chest and you are facing east for example, the positions you see will tend to be clustered along a north / south line , possibly hundreds of metres from your position.
Try leaving a GPS on a windowsill (in a brick house or one with aluminum insulation) and log its position. You will get a cluster of points around the real position, and occasional 'movement' out to some distance and back again, generally lined up with the wall of the house.
And elsewhere on the net you will find people who have hacked their Galaxy S GPS antennas with bits of tinfoil to make them work better.
It seems to be a design problem with that model of phone. The SII has a much better GPS performance.
-
Android Positioning API WTF
(prompted by the posting on the calorie/Calorie/kCal/Avocado counting app..)
Quite a few GPS tracking apps on my Samsung Galaxy SII show big jumps to lat, long 0,0 which is on the equator somewhere off the coast of Nigeria, especially if I keep the phone in my pocket while it is tracking. No my pocket is not a steamy equatorial jungle or an equally hot and boring bit of sea with a risk of piracy ....
Digging deeper into the APIs presented by Android, they state that the 'position' 0,0 indicates 'No GPS position'. You can ask other APIs for the number of GPS satellites but the position reported from the API may actually not be a GPS position - could be a cell based position with 0 GPS satellites used.
So the apps have to pick up exactly (0,0) which is a valid position and treat that as a no-position. Maybe on a lot of Android phones the GPS system doesnt output 0,0 for no position.
WTF didnt Google define something sensible like latitude > 90 degrees as a no-position then all of the app coders would have been forced to deal with it.
In my previous life, we met the same problem , but this was GPS on an oil survey ship and again some GPS receivers will output lat0,lon0 for no position (along with other flags which should tell you but which became confused - it could still see N satellites, used all of them to get a fix but could not actually solve a position because the geometry was bad ... ) .
We got around this because the GPS positions were input to a Kalman filter, and so if the ship surveying off Nigeria (quite possible) happened to pass near 0,0 it was extremely unlikely to go through exactly 0,0 and even if it did, the next position would be a few metres away .
So we just deleted any exact lat0,lon0 positions and let the filter interpolate across the hole.
-
RE: Great Ideas
I also had to pull my invention of a
"Zero instruction set computer"
from the corporate patents process a few years ago.... because I realised that was just a microcoded machine.
And I was eventually made redundant...
We were working in a lab where we were inspired in our pursuit of the patentable by the fact that somebody had patented the use of a red button on the TV remote control as a means of accessing information.
-
RE: Great Ideas
My worst one - and its real : WiFi over wires...
http://worldwide.espacenet.com/publicationDetails/biblio?DB=EPODOC&II=1&ND=3&adjacent=true&locale=en_gb&FT=D&date=20100624&CC=US&NR=2010157817A1&KC=A1
I have also never found any patents for a steam powered wheelbarrow.
-
RE: Asymmetric Hex Encoding
All I did was typed in a tag, and then changed my mind, selected the text and typed the string "C++",using the "select text and type replacement text is text replacement" paradigm.
As I did it I could see some strange stuff flickering in the tag line.
But as what I saw when it settled was what I meant it to say, I hit submit. Sorry.
Back on topic- being exposed to these kinds of code snippets, along with code in VB6 (too old, unsupportable) , Borland C++ builder 5 dialect of C++ (bizarre restrictions) , Managed C++ from MS (not-quite-C++ presented as C++) has made me doubt my C++ sanity.
I ended up having to wash my mind out by going away and reading a C++ primer to remind me of how code is meant to be written in C++.
And getting over having a cold helped.
-
Asymmetric Hex Encoding
I was scanning through a coworkers code and found the following pair of functions.
They are beautifully asymmetric in the amount of coding paranoia and sensitivity to character code ordering.
DWORD htoi( char *pText)
{
DWORD RetVal = 0;
// Add up the characters.
while( *pText)
{
const char *p = strchr( "01234567890abcdefABCDEF", *pText);
// Check the value is a valid hex character.
if( !p)
{
return RetVal;
}
// Else multiply the total so far by 16.
RetVal *= 16;
// Else add the correct value to the return value.
switch( *p)
{
case '0':
break;
case '1':
RetVal += 1;
break;
case '2':
RetVal += 2;
break;
case '3':
RetVal += 3;
break;
case '4':
RetVal += 4;
break;
case '5':
RetVal += 5;
break;
case '6':
RetVal += 6;
break;
case '7':
RetVal += 7;
break;
case '8':
RetVal += 8;
break;
case '9':
RetVal += 9;
break;
case 'A':
case 'a':
RetVal += 10;
break;
case 'B':
case 'b':
RetVal += 11;
break;
case 'C':
case 'c':
RetVal += 12;
break;
case 'D':
case 'd':
RetVal += 13;
break;
case 'E':
case 'e':
RetVal += 14;
break;
case 'F':
case 'f':
RetVal += 15;
break;
}
// Increment the text pointer.
pText++;
}
// Return the return values.
return RetVal;
}
char itoh( BYTE b)
{
if( b <= 9)
{
return b + '0';
}
else
{
return b + '0' + 7;
}
} -
RE: Banking Woes
Having once had a card number and PIN code extracted in a Southampton, UK petrol station staffed by some dodgy people (using either in-line keypad reader or an overhead camera watching me), their colleagues made $2-$10 coffee and gas purchases in the eastern USA until they got brave and ran up $1000 in Home Depot or similar. Fortunately that was seen by the credit card company as fraud and they refunded all of the payment.