Browsed by
Category: Technical

Triple sun appears over Leshan in China – baffles scientists

Triple sun appears over Leshan in China – baffles scientists

On July 26th, the Chinese city of Leshan witnessed a phenomenon that’s puzzling experts: What appeared to be three suns in the sky at once:

The best guess so far was a kind of Sun dog (see the images of the ones in Antarctica to get really blown away).  Perhaps it is due to the fact Leshan is known for having terrible amounts of air pollution.  My conjecture?  Sun dogs are created by ice crystals bending light (the ice bends light by 22 degrees – and can even do other effects if the crystals start aligning as the fall uniformly to the ground); perhaps an airborn chemical/pollutant in the area bends light by different amounts to get this effect.  Should be a way to find out what the local factories are pumping into the air, do some samples at low/medium/high altitudes, and see their refractive properties are when combined with ice/water in the air…


Another strange phenomenon:

This isn’t the only recent weird sky phenomenon that has scientists scratching their heads.  Discredited for years, it’s now pretty clear that before some earthquakes – strange ‘lights’ appear in the sky.  This has only come to light in the last 3 years or so with widely photographed and filmed lights before the gigantic earthquake in China a few years back, and several more recent events in Chile.

This has lead all kinds of conspiracy theory nuts go wild about it being because of HAARP experiments, the coming 2012 Maya apocalypse, UFO’s, ‘scalar weapons’, etc.  Still – it’s intriguing and very curious stuff.

Here’s a video of the lights supposedly taken only 30 minutes before the great Chinese quake:

Tracking the nation’s moods using Twitter feeds

Tracking the nation’s moods using Twitter feeds

A computer scientist at Northeastern University in Boston tracked ‘feeling’ words used in Twitter feeds to track moods during the day.  Couple of my own observations:

  • East coast is far more unhappy than the west coast
  • Indiana never gets anything other than unhappy
  • If you are up at 2-4AM in the morning, you’re likely not a happy camper no matter where you are.
  • We all seem to be unhappy around 4pm – that’s when we should strike!
  • SoCal and Florida almost never gets angry as a whole
  • People seem very happy right before work and about 2 hours after work.  I’m surprised there wasn’t a “Happy hour wave” as 5pm moved across the country. 🙂

Left4Dead 2 – the Passing – and Steam thinks I’m running in compatibility mode – but I’m not…

Left4Dead 2 – the Passing – and Steam thinks I’m running in compatibility mode – but I’m not…

Yet another case of Steam’s PC client giving me headaches that can’t be solved by mere mortals.  I don’t think I’ve had  ONE successful launch day download that didn’t require 2+ hours of fixing/waiting/etc.

Left4Dead2’s new DLC level “The Passing” added one more mission and several new gameplay modes on Thursday last week (which was free on the PC, but cost money on the XBOX).  I forgot to leave my machine on during the day of launch, so I had to start downloading when I got home from work.  My bad – but I was surprised that they didn’t let people start pre-loading like they did for the original launch of Left4Dead2.  Anyway, after getting several ‘Servers too busy – try downloading later’, I finally got a download started.  4 hours later it completed. Steam restarted to install some patched, and then when I restarted Steam, my Win7 x64 popped up a dialog saying it was going to apply compatibility settings to steam because it detected an install problem.  There was no way to say “No – DON’T do that”, so it went ahead and applied these ‘settings’.

Then, when you tried to start Steam again, you got error dialogs from Steam saying:  “Running Steam in Windows compatibility mode is not recommended. Please remove any Windows compatibility settings for all users under file properties for Steam.exe and restart Steam. Press ‘Cancel’ to permanently ignore this warning and continue.” I click on the file properties for the executable and go to the compatibility tab -but it says there are no compatibility modes set.  I try setting/resetting them – still get the error.  I look online, people have tried completely installing/uninstalling ALL their games/Steam – no luck either.  Finally, someone grabs Microsoft’s Application Compatibility Tool and found the compatibility keys for Steam.  He then dug around in the registry to find where those keys were kept, and does this:

To fix the issue:

  1. Hit start->run->regedit
  2. Go to key: HKEY_CURRENT_USERSoftwareMicrosoftWindows NTCurrentVersionAppCompatFlagsLayers
  3. Look for a entry with your path to steam.exe
  4. Delete that entry
  5. If you dont find it there try HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionAppCompatFlagsLayers

So, there’s your fix

Saturn’s hexagonal ring explained (partly)

Saturn’s hexagonal ring explained (partly)

The hexagon ring discovery a few years ago on Saturn was fascinating, but this possible solution from some fluid dynamics folks appears even more so.  Their basic premise is that they can duplicate the flow by spinning a ring under the surface of the water.  This would imply the pattern is created by some kind of high-speed storm running around the pole below the visible cloud layer.

A particularly interesting part of the article is that they can  make other shapes too by varying the speed of the underlying spinning ring/storm.  My question is since it was a scale study – how fast would the winds in that storm be running?  As it is, wind speeds on Saturn are already known to reach 1,800 km/h – and that’s crazy fast (~Mach 1.5).

Wild Windows 7 bug with Dell 30″ Ultrasharp monitors

Wild Windows 7 bug with Dell 30″ Ultrasharp monitors

 

I ran into a majorly weird bug with Windows 7 Ultimate – one that I’ve now confirmed on two different machines and even went so far as to contact Microsoft about.

I have a really great Dell 30″ Ultrasharp monitor at work. Beautiful monitor, big, and has a nice set of USB and card reader ports on the side. I love the monitor and used it under Vista for years now.  However, after upgrading my machine from Windows Vista to Windows 7, all kinds of stuff started to go horribly slow or just not work on the machine. I did a fresh install, and then all heck started breaking lose from the get-go.

Compiling apps with Visual Studio started taking much longer, all kinds of apps started acting strange by going grey and not accepting input for long periods of time, multimedia apps will sometimes have huge delays before starting (Winamp once took 30 minutes to start playback), others will have very slow/choppy playback, and many USB and other devices didn’t show up or work (mice, etc).  I found that none of the ports on my Dell monitor worked.  Further exacerbating the problem – you couldn’t open most of the system tools.  The Disk Manager tool would just sit and say it was trying to connect to the Virtual Disk Services forever, and most control panel apps you’d click would never come up.  Yet at all times, the CPU will show 1% utilization.  Within about 10 minutes of bootup – everything you did was unstable and hickup-ridden.  It made using the machine intolerable.

In a fit of frustration, I started unplugging devices to reduce the number of variables – and when I unplugged the monitor’s extended USB ports plug – all of a sudden the machine snapped to life.  The device manager popped up and listed a whole pile of new devices and install them.  All of a sudden – everything worked.  No more app timeouts, no more long delays, no more missing devices.  I plugged back in the USB ports of the Dell monitor, and it went back to being broken.  Holy cow – a USB port/cardreader was bringing Windows 7 to its knees.  I plugged the monitor back into my vista box to see if it really was the monitor – but everything worked perfectly.  I went over to my bosses cube who had the same monitor.  He was having video playback problems – it was going really slow.  I told him to unplug the USB ports on the monitor, and as soon as he did that – the video instantly went full speed.  Neither of us would believe it if we’d not seen it with our own eyes.

As of now, I have this logged with Microsoft under ticket #1125286661- we’ll see if anything comes of it.

A parking meter can teach a software engineer many things.

A parking meter can teach a software engineer many things.

I go to The New Old Thing a fair amount. It’s a blog written by a veteran system level guy at Microsoft. He puts some fun articles up – and I had to respond to this one. Here was his original article:

A car park in Birmingham switches from English to German in times of stress. Over a decade ago, a colleague of mine noticed an error message on the screen at the exit to the parking garage at the Seattle-Tacoma International Airport. The way the airport works, you pick up a ticket as you enter, and you pay your parking fee at vending machines stationed around the parking garage, and at the exit, you insert the (paid) ticket into the machine, which verifies that you paid your parking fee and opens the gate.

When my colleague pulled up to the machine, it had an error message. In German. Fortunately, my colleague knows German, and he recognized the error message as a Windows 95 serial port conflict resolution dialog. While he was trying to figure out how to click Abbrechen on a machine with no mouse or keyboard, an attendant walked up, took his ticket, and opened the gate.

A conversation ensued about what went wrong and the right way to fix it. Here was one guys response:

yuhong2: Well, as I remember, the dialog in question relates to multiple DOS virtual machines trying to access a serial port at the same time. There was several ways to virtualize a hardware device across multiple DOS VMs, and one of them was to allow only one DOS VM to access a device at a time. If two of them tried to access at the same time, the only option was to pop up a conflict resolution dialog like this one, and Win3.x and Win9x had built-in support for doing this. More information on all this stuff can be found in the old DDK docs (like the Windows Server 2003 SP1 DDK) that had the VxD documentation.

At which point I needed to reply with the following, and got some serious ‘Amen brothers’:

@yuhong2 – your answer is totally plausible, but shows what a lot of us do (me included) – in the face of a bug like this – we just keep jumping down the engineering rat/rabbit hole without stopping to ask a more fundamental question of whether you’re even on the right track with your architecture.  I’ve learned to stop looking down the hole and to try and smell them coming before I start. Trust me – there IS no bottom. And more importantly, when you’re spending your time looking off the cliff, you’re not looking at your goal anymore.

After being a software engineer for 10 years on major projects – I’ve learned this one lesson about code usability: if you’re using more than 3-4 sentences your mom can’t understand to describe a fix or architecture; something is likely gone, or will be going, very wrong soon.

While I completely understand what yuhong2 is saying and it’s very plausible and intelligent, if it’s true, it shows me that someone made a terrible choice of platforms/architecture when choosing to solve this problem of a parking meter. I’ve worked with more than a few tech leads that come up with horrendously complicated algorithms and architectures to solve problems that could be solved MUCH more easily. And you know what? The easier solution, while perhaps not the fastest or cool looking, is almost always the fastest and best long-term. Why? Because those complex architectures have even more complex problems. i.e. yohung2’s answer.
As the project grows, it just gets worse and worse – not better. Until you need a phD to figure out why some part of your threaded, interconnected data structures are hanging or getting corrupted once every 30 days. This should be a moment to stop and ask yourself what you’re really doing. Sure, certain problems really do require complex solutions (i.e. 3D graphics, threaded applications and drivers – some of what I do), but know your tools and the strengths and limitations of them (the hardware platform, the language you’re using, the software/os stack, etc). Yes, you darn well better have a good toolbox of the latest algorithms, languages and OS info, but your toolbox will do nothing but get you into trouble if you don’t know how and when (or when NOT) to really use those tools. If yuhong2 is right, you see how your complex solution just backed you into a corner and shows you someone probably picked the wrong stack or algorithmic approach when just having a very simple box that checked times would have worked.

I have worked long enough to also know that many times platform choices are out of your control as an engineer – budgeting and marketing often limit you. But if you’re forced to use a platform – design so-as to avoid the limitations of that platform – don’t try to force them into doing what you want. As a rule of thumb, always stick with the simplest solution that completely solves the problem first, then you’ll be re-writing to solve performance and feature issues instead of core this-thing-doesn’t-even-work-yet problems. At worst, I’ll have a working system that’s slow and I can then optimize and re-design the parts that need it. I won’t have wasted time optimizing for things that may not have needed any help. Now the caveat is that you really must know what you’re doing and why your making those choices for simplicity. It’s just as bad to stupidly pick an architecture that’s too simple for the problem and gets you just as much in a corner. But I’ll argue a working, slow system will always sell and ship before one that’s 10 months late and MIGHT be faster. Simplicity also makes the code more maintainable and much more extensible long term as there’s less inherent inertia in the code to move about.

Software is like using clay to make art. Sure you can beat and force and manipulate it to create very complex structures – but you start making more and more complex problems for yourself. i.e. if you try to build a car engine from clay. If you work *with* the clay/code’s natural strengths and not force it to do what it isn’t good at, however, you end up with beautiful thing that’s simple, works well for its intended use, and is very easy to maintain (a clay bowl).

Another guy summarized even better:

For any sufficiently complicated system, there will always be failure modes where the average Joe has but two options: call an expert to fix it, or arrange his life to not use that system. In the case of the parking garage, Joe’s only rational response is to use a different exit lane.

Computer interface design goes wrong when the programmer refuses to admit that the system is in such a state. The parking garage’s system should have displayed “Closed – use a different lane”, with the error message shown on a maintenance screen.

This echo’s some of the great wisdom I’ve been learning from this great book:

Believe it should be on every programmer’s shelf.  I’ll do some more postings as I get through it.

Stocks gadget/widget for Windows 7

Stocks gadget/widget for Windows 7

Miss the old-style Vista stocks widget/gadget?  I do – and the new one has a terrible look and feel.  So they finally fixed the old one to work on windows 7.

But classic Microsoft help forum though – they bitch and moan about how there’s a new version that’s SOOO much better and you’re basically stupid for not using it.  Only after tons of people complain constantly on how the new one is terrible (which IMHO it is terrible looking) – *then* they finally fix the old one and release it quietly.  Man – take a page from customer service people – the customer is right – not the engineer in the case of look and feel.

Anyway, here’s the gadget:
http://gallery.live.com/liveItemDetail.aspx?li=2640b097-ed79-4aad-8877-313d5a8558c9&bt=1

Left 4 Dead 2

Left 4 Dead 2

If I’m not at work right now, I’m playing Left 4 Dead 2. It just released on Steam for PC Tuesday night.  It’s one of the first games I’ve actually pre-ordered well in advance of the game and pre-loaded from Steam’s online service.  Here was my experience:

  1. It was unexpectedly late by over an hour with no explanation – Steam prominently posted that the game would release/unlock at 9pm PST on Tuesday.  I loaded up Steam on my PC at 9pm, but it showed as still not released yet.  I went to the forums, but the Steam Forum website was so overloaded that no amount of cajoling would get the page to come up – it just timed out continually.  The main purchase page said it was still set for 9pm release, but there was absolutely no status, news, or updates on why it wasn’t working.  I went to other gamer forums where people were beginning to rage.  It was midnight on the east coast, and folks had been staying up late to try it out.  I watched an episode of Mythbusters and a Twilight Zone while the online rage continued – and utter, complete silence from Valve as to what was going on.
  2. Unlocking/decompressing it went awry – Around 10pm, the Steam forum started to come back enough to read what problems people were experiencing.  First off, restart the Steam service (which took several tries while the login attempts timed out) – then my machine recognized that the game was released.  I clicked on the app to trigger decryption, and after a little while with the dialog up indicting it was trying to verify something – the box went away and it did nothing.  No error message, also no playable, decrypted game.  I rush over to the forums which are already lighting up with folks having all kinds of problems.  I dug through the problem descriptions until I found a likely solution and had to follow these steps to get the thing to start decrypting:

    # Exit Steam
    # Open a ‘Command Prompt’ (cmd.exe if you are using ‘Run…’ from the start menu)
    # Run: “c:Program FilesSteambinSteamService.exe” /repair
    # Note: Change “c:Program Files” to wherever you have steam installed. For a 64 bit OS the default would be: “c:Program Files (x86)SteambinSteamService.exe” /repair-
    # Start Steam

    This worked, but I STILL need to do this every time I restart Steam or the game won’t load…

  3. Random crashes to desktop: After decryption (about 20-30 minutes total – now making my 9pm release time about 10:40pm), I finally got the game to play after a few more clicks on the game with silent failures while it’s trying to ‘sync’ with something, then it fires up.  Glorious!  I hop into a game and start having a blast (literally and metaphorically).  I play for about 2 hours, then right in the middle of the finale of Dark Carnival – it crashes me right to the desktop. No warning, no error, etc.  Wham.  I restart and after about another hour, it does it again.  Then one final time and I go to bed.  Already folks are seeing all kinds of problems, and this was one of them.  Next day, I have Steam verify the downloaded game cache – and it has 2 corrupt files that it re-downloads.  Shesh – had been playing it for hours and it didn’t check that?  But it still keeps randomly crashing to the desktop – and someone on the forum suggests this solution:

    1.Click on Start
    2.Click on My Computer
    3.Click on Your C: Drive
    4.Find & Open Windows Folder
    5.Find the CSC folder/right click then properties/Security
    6.You will need to get or give your user account admin rights to the folder once you do that make sure you give all rights to that user.
    7.Click apply & click ok
    8.Close down Steam and Restart it
    9.If Done Correctly Your Left 4 dead 2 game will work with no problems.
    10.Enjoy The Game
    11.If your still having problems make sure you look over the steps in this list and make sure you did everything right

  4. It works – but still utter silence from Steam/Valve – All this finally appears to fix my problems – but there’s lots of others still having problems (such as the dread error 35, error 2, and others still around from the demo release) that prevent them from playing the game.  Valve has still said absolutely nothing on the forums about anything going wrong.  It’s just users helping each other.  Overall, I’m seriously re-evaluating ever buying something pre-load from Steam again.  For the first time in a long time, I really felt utterly helpless after getting a new game and wondered how many days it might be before the game I bought a MONTH ago might work.

Still, Left 4 Dead 2 is an amazing game – and it’s fantastic fun.  Steam has now left a horrible taste in my mouth – but it’s done that before.  Still, I’ll certainly be spending most of my nights playing this for the forseeable future!

Error: File ‘is too large for the destination file system’ – but there is tons of room!

Error: File ‘is too large for the destination file system’ – but there is tons of room!

Fun fun.  I was trying to copy 6gb iso file to my 8gb flash drive (where 7gb was free) and I kept getting an error message that the file ‘is too large for the destination file system’.  I didn’t have time to fiddle with it – so I left it.  Yesterday during a backup, I got the same message again trying to back up my Windows Media Center recorded tv shows.  The 1tb drive was empty, yet I kept getting errors about not having enough disk space.  Ok, what’s going on?

USB drives and external HD’s are often formatted with FAT32.  You cannot copy a file larger than 4gb to a FAT32 system.  Unfortunately, Vista gives you the cryptic file is too large for the destination file system error instead of telling you the real reason is that FAT32 cannot handle files that big and what to do to fix it.

So, how to get around it?  You need to convert the file system to NTFS (or other file system that can handle files that big).  You can obviously reformat the drive,  but that’s a pain if you have data on the drive already.  You can, however, do a one-way convert to NTFS without data loss on the drive by using the command:

convert X: /fs:ntfs /nosecurity

Where X: is the drive letter you want to convert.  As long as you have about 10-15% of the volume empty, and you don’t have any files on that drive open, the file system conversion will happen and all your files will be there as before.  It’s a fairly quick process – about a minute or two on my external 1tb drive (drive was almost empty).  So, a very poor Vista error that doesn’t tell you how to fix it, but a very smart tool that does what you need.