Tuesday, December 29, 2009

Director devs, show your Lingo Love!

Code horror is something we've all experienced, but I just thought that maybe not everyone had ever experienced the joy that was coding in Macromedia Lingo.  Here is a perfectly good script from a director project...

_1. on mouseDown me
_2.  
upMember = the memberNum of sprite(the clickOn)

_3.   the memberNum of sprite(the clickOn) = upMember + 1
 4
.   puppetSound 1, "downSound"
 5
.   updateStage 
 6
.   repeat while the mouseDown
 7
.    nothing
 8
.   end repeat
 9
.  the memberNum of sprite(the clickOn) = upMember

10.  puppetSound 1, "upSound"
11.  updateStage
12. end



So, what does this do?  It's a mouse click handler for a button!  It swaps out the button's picture for the next one (so, be sure to remember to keep the down picture as the next cast member or this will look wonky).  Then it plays a sound to start the click, then waits until you let go of the mouse.  At which point, it swaps the button's picture back out for the up picture and then plays the up half of the sound.  My favorite part is all of the "natural" language: me, the, of.  There's even an alternative to using the = sign, if that's too fancy for you.  Line 9 could be written like this:

9.  set the memberNum of sprite(the clickOn) to upMember


Now that is fun to read!  Anyone else have some delicious lingo scripts they'd like to post for historical preservation?

Thursday, December 24, 2009

Which edition of Windows is right for you?

I work at "Nerd"Squad but finished my degree in computer science a year ago.  This has given me not only the opportunity to experience the sheer stupidity of the computer-using public - as all "Nerd"Squad employees must - but also the sheer stupidity of my fellow "Nerd"Squad employees.  Last week, one of the other guys called me to the back to give him a hand.

When I got there, I was dumbfounded.  Here's what the guy was trying to do:

He had a brand new Samsung Jack phone on the bench.
It was plugged into wall power.
It had a USB cable in it that went to a USB hub (which was powered).
The hub had another USB cable in it that went to an external DVD drive (which was also powered).
The external DVD drive had a copy of Windows 7 Ultimate in it.

Here's his sole question before I walked out:

"Hey, Mike, this guy wants Windows 7 Ultimate instead of Windows 6.5 Mobile.  Where do I find this DVD drive on here?"

(submitted by Mike)

Friday, December 18, 2009

To whom it may concern? Yes, we're all concerned now.

I work at a company which provides outsourced IT support to small and medium sized businesses who don't want to build their own IT departments.  I recently got this email request from a "power user".

To whom it may concern,


  I am a long-time computer user and one of the most experienced network users in our division.  I was part of the original project to set up Netware 2 and, later, Netware 3, so, I'm no stranger to working with networks.  Recently, as part of an effort to develop some new support materials, I was told to visit a network site called Flickr.  I have to ask, what is the point of this site?  I can search for terms and it returns a browsable list of what...  captions?  I don't get it.


  Please advice as to what I'm missing here.


Thanks,


Mr. Networker

We had to ask for more information to help him.  Sure, we all knew what Flickr was, but, we didn't understand how he could "miss the point".  His reply laid it all bare.

To whom it may concern,


  I don't get it as in, how is this any different than dogpile or yahoo?  I put in a search term and it returns a bunch of blurbs to me that don't necessarily have to do with my search term.  If I wanted that, I could pick random lines from a dictionary.  I seriously doubt that there's anything wrong with my computer since I'm considered a power user within the division, so, I suspected that it may be something wrong with the network you've been administering.  Regardless, here is the information you've requested:


Computer: Dell Dimension 1100
OS: Windows XP Pro
RAM: 512Mb
Browser: Lynx 2.1


Please fix the network asap and tell me what I am supposed to have seen on this Flickr network site.


Thanks,


Mr. Networker

Tuesday, December 15, 2009

Ah, I see you have the machine that goes PING!

We are currently undergoing a big upgrade to our web systems that requires I "babysit" the entire process to confirm when the sites go down and when (more like "if") they come back up.  There is also a live troubleshooting IRC channel for employees to get on and seek help.  Amid the upgrade, I was watching the chat and saw this:

Some Guy: Hey!  I need to get to my dev site and I can't!
Web Manager: All our sites are down.  They work internally with IP's but outside they're inaccessible.
Some Guy: Well, I can ping it internally by IP.
Web Manager: I think I just said that.
Some Guy: But when I put the name into my browser, I don't get anything.
Web Manager: I think I just said that, too.
Some Guy: Ok, so any suggestions?  Like I said, I can ping it interally by IP.
Web Manager: How about typing that IP into your browser bar?
Some Guy: Good Troubleshooting Idea!  I'm going to try that, hang on.
Web Manager: Okay.
Some Guy: It only kinda worked.
Web Manager: How do you mean?
Some Guy: when I use the IP, I get the site, but the address bar doesn't change from the number.
Web Manager: That would be the expected behavior.
Some Guy: Oh?  Ok.  So just use the number from now on?
Web Manager: No, only during the upgrade cycle, afterwards, you can you the names again.


(submitted by effbo)

Thursday, December 10, 2009

Randomization

public int randomize(int maxValue)
{
    return ((((int)DateTime.Now.DayOfWeek) + DateTime.Now.Second + DateTime.Now.Millisecond + DateTime.Now.Second) % maxValue);
}


I was touring through some of the base libraries that we use in our code at work and had always wondered why we didn't use the built-in Random functions.  We were always told that the randomize function was better because there was a "flaw" in .NET that made the random function produce the same number every time it was used.  This function was the "official" solution to that problem.

Tuesday, December 8, 2009

Just in case...


Just in case the gubmint decides to add another month.
Obamuary, anyone?

  So, I can't decide...  is the height of laziness or the height of malfeasance?  Sure, I guess it could really be a hassle to type out the names of the months again and again for drop down lists, but only if you don't know how to write it once in an include file or library.  The laziness here could be either being too lazy to type the months repeatedly or too lazy to learn how to not type the names repeatedly.  If, on the other hand, this user is aware of the cost of a database connection and chooses to pull this mundane list every time someone needs to fill in a date drop down, then I say Bravo!  That'll show 'em.  Show 'em what, I can't say, but, by gum, it will show them.

(submitted by anonymous)

Saturday, December 5, 2009

I'm dreaming of a brownish-putty-colored Christmas...


The moon on the breast of the new-fallen dust
Gave the lustre of filth to the PC's guts,
When, what to my wondering eyes should arise,
But a miniature heat sink, and 4 tiny surprises,
With little black chips, so lively and quick,
I knew in a moment they must be RAM sticks.

Thursday, December 3, 2009

Apple strikes again...

Mac users...  is there anything they won't misunderstand?

A few years ago - when Apple's monitors looked suspiciously like the original iMac but with insect legs - we were upgrading all of the Mac users on campus to flat panels.  I can't tell you how many times I had this exact same conversation:

"Wow, a flat panel!  I love it!  It looks like something from Star Trek!"

"Ok, are you ready for your new monitor?"

"Sure, but, how are you going to get my files transfered over?  Have you got a jump drive or a hard drive or some kind of cable?"

"We're not replacing the computer, just the monitor."

"Oh, ok, sure.  But how will you get the files out?"

"We're not replacing the computer, just the monitor."

"Ah, I see ok, sure.  So they'll just automatically transfer or something?  Man, Apple really is user friendly."

"No, we're not replacing the computer, just the monitor."

"Ummm..."

"When you replace the windshield in your car, you don't have to worry that the stuff in your trunk will disappear with the old windshield, right?  Same thing here."

"Oh!  Oh, ok, I got it.  Sure.  They'll still be in the same place after you've moved them."

/sigh/

"Yes, I'll make sure to do it so it's just like you left it.  You know how easy Apple makes it."

This was repeated time and time again...  it really was a grind.  And the kicker came a week after we were done.  The dean called me and the other technician one afternoon and had some harsh words for us.  Here's the subsequent email:

Tech Staff,

  During the recent apple upgrade, it has come to my attention that little care was given to the preservation of existing faculty work.  Specifically, more than 1 faculty has contacted me and informed me that they would be late submitting their annual reports because the files which they had been working during the last 2 semesters were not properly transfered during the equipment swap out.  To this end, I am including a list of users who will need to have these files recovered from their previous equipment and sent to them ASAP.  If this cannot be done in a timely manner, we will have to review our technology personnel and data policies so that we can ensure this does not happen again in the future.

Dean Eye-Dee-Ten-Tee

(submitted by bbasttt)