Whoa!

July 19, 2007

Where did the time go!? I went out for sushi tonight with some friends (and boy am I an avid sushi fan), and when a friend mentioned he had a new public blog, I remembered I had one myself that I hadn’t updated in a while.  Oops. It’s a little weird writing in a public blog, after having written in a private one for so long. For one thing, I’m a lot more conscious about how I talk, whereas in my private one, I feel free to throw around as much bad grammar, nerd-speak, and abbreviations as I please. Hopefully, I’ll relax enough so that I can have a happy medium between the two.

So much for summer being a slow and relaxing time. Before I know it, summer’s flown by and I haven’t accomplished as much as I nearly wanted to (isn’t that how it always works…?). Anywho, in the month long gap where I haven’t updated, I:

- Took a trip to Boston, and visited the Museum of Science, which I haven’t seen since I was in 6th grade. Boy did things look different from how I remembered them…everything seemed so much smaller, and sadly enough, I was a lot less amazed. (The most alarming realization I had was seeing the probability ball drop in the math section, and seeing that it created a bell curve…”But…that’s how our grades are determined!” *shudder*)

I took along my sister and her boyfriend too, and they went off to visit Tufts University. I also met up with a friend and had the best Italian food ever, at a little restaurant called Antico Forno.  Seriously, now–I’ve had Italian food, and I’ve had Italian food, and this was..just absolutely amazing. I don’t know what they put in their sauce, but it was just..mmm. We also made a visit to Mike’s Pastry, where I purchased some cannolis (and they *are* pretty good.)

- Went to a wedding, where I promptly forgot about my fear about dancing in public and danced away. It was pretty fun, and I’m glad I ended up going with a light and flowy dress (it got pretty hot in the dance room!) I also sampled the most excellent alcoholic mixed drinks (their names I’ve unfortunately forgotten though.) I think I’m shaping up to be a pretty picky alcohol-consumer—none of that regular ol’ beer or gasoline-tasting vodka; I’ll have the good-tasting stuff, thank you very much. (Spending a summer in Europe didn’t help either, where I could legally sample as many mixed drinks as I pleased…or as many as I could hold anyway, which isn’t that much, coincidentally, harhar.)

- Saw a ton of movies. I guess it makes up for not watching any TV or movies during the school year. Let’s see…I’ve seen: Resident Evil 1 & 2 (pretty good!), Ratatouille (excellent, and the art was spectacular, of course), Oceans 13 (good), Harry Potter and the Order of the Phoenix (it’s good if you haven’t read the book, and not so good otherwise, imo), Underworld, Underworld: Evolution, The Gravedancers, The Abandoned, 1408 (pretty good)…I’m still looking forward to The Simpsons and Neil Gaiman’s Stardust (!!). :D

- Finished the menus and spiffy-upped the general look of the interface, and now I’m happy to say that I think I finally got the hang of Javascript, CSS, and HTML. It was also a good review on my Java skills, which needed some polishing up on after a semester-long break. Now I’m working on C and some business with magnetic card swipe readers.. (haven’t got a clue about where to start, quite honestly. Amusingly enough, the woman I’m working on the project with told me that the best lesson she ever learned was to just get used to “feeling stupid” whenever she switched jobs. I agree.)

-  Am partaking in the Harry Potter madness. Actually, now I’ve read the first page of the 7th book and heard two spoilers. You’d think I’d learn my lesson and ban myself from the internet until I finish the 7th book or something…but no. I do things the hard way.

I’m looking forward to enjoying the rest of the summer to the fullest extent…This has been one of the best ones, which is a good thing, because I have a feeling that the semester won’t be…(ewwww theory of computation, go away!!)

[Names changed...]

Kate, the lady in charge of advertising downstairs, was nice enough to give me an opportunity to get out of my closet-of-an-office for a little while and tag along on a business meeting with a web development company. (This is a big treat for a college student who’s not used to being crammed in a stuffy little office all day, and who prefers free-range roaming on campus instead.)

This was my first experience with a business meeting outside our company, so it was really interesting to observe how things went down, the process, the etiquette (although I admit that the atmosphere during the meeting was considerably lighter than the atmosphere at work..), etc. It also convinced me that maybe I should take a few business classes or try and attend a few more business meetings to get a hang of this smooth business-talking style, because I, like so many other pseudo-programmers/programmers/nerds, am not adept at speaking formally..

Anyway, the building was absolutely gorgeous..(though any building with lots of open space inside might seem considerably more attractive when you’re used to a closet). Kate agreed with me, and we just awed..

“Whoa, you guys have windowshuge windows..”

What is it about lots of office buildings not having windows anyway? Is it because it’s distracting? Easier to work when you lose track of time and get into the “zone”?

Anyway, Kate told me that she didn’t notice any women on the company’s list of employees, and sure enough, I didn’t see any when we were given a tour around the office. There aren’t too many women where I work either–just the secretaries, Kate, and two other women. You’d think I’d be used to this by now after having taken computer science classes for 2-3 years (I’m counting high school too), but it still made me a little sad to see it in the real world.

Lately, I’ve been talking to some people about potential projects after I’m finished with this navigation bar (and boy, am I looking forward to that), including some Flash animation, actual website building (not just web-based applications), and Java programming, and I’m getting really excited to work on new stuff. Just this cursed navigation bar in the way… (never again, never again!!)

Tech-y post written for all the unfortunates who have suffered or are still suffering from the same problem I had….

Recently, I started working on part of a web-based application for a company over the summer, and me being:

1) A very visual person

2) Horribly inexperienced with Javascript, HTML, DOM, and the like..

I began using Dreamweaver (first 8, and then CS3) to help me create a series of dropdown menus, with an applet directly underneath the navigation bar. Almost immediately, I ran into the problem of my dropdown menus appearing behind the applet instead of in front. I scoured the web for many days, searching for a solution, and mostly what I found were suggestions to rearrange the page so that the menus simply wouldn’t drop down in front of something (an answer I found to be particularly frustrating), unanswered pleas for help often accompanied by insane and intimidating code posts (Dreamweaver’s drop-down menus come with a nasty-looking javascript file), or criticisms of Dreamweaver’s drop-down menus (and rightly so), with suggestions to go find a free one or follow some tutorials. I also fell upon Andy Finnell’s criticism of the menus, and you know it’s pretty bad when even the guy who had a part in developing part of the menus tells you not to use them.

Anyway. But let’s say that for some reason or another, you’re absolutely determined to use Dreamweaver’s menus–maybe you don’t care about the javascript file size or the code’s inefficiency–you just want some damn drop-down menus.

There’s a solution posted here, but the solution is only for Internet Explorer. (Many thanks to SDozono anyway!) Turns out the trick was to put an iframe (apparently they call this an iframe shim technique?) behind the menu, to force the menu to appear over things. Pretty spiffy. To have it working for Firefox, a few additions and changes have to be made:

In the checkIE() function, you can either change it so that it returns true for when Firefox is the browser in question, or just get rid of this function entirely (and deleting any calls to it in other parts of the code). To change it so that it returns true for Firefox:

function checkIE()
{
var BrowserName = navigator.userAgent;
if (BrowserName.indexOf("MSIE") > -1)
{
return true;
}
else if (BrowserName.indexOf("Firefox") > -1)
{
return true;
}
else
{
return false;
}
}

This is because SDozono’s shim-related methods run a check to make sure the browser is IE, or it won’t execute. Next thing to change is the writeShim() function:

...
if (BrowserName.indexOf("MSIE") > -1)
{
var shim = document.createElement ("<iframe id='"+shim_name+"' scrolling='no' frameborder='0'"+
"style='position:absolute;top:"+shim_top+"px;"+
"left:"+shim_left+"px;z-index:5;' width="+shim_width+" height="+shim_height+"></iframe>");
}
...

It turns out that IE and Firefox handle some DOM elements differently–or in other words, Firefox won’t allow you to pass in bits of HTML in DOM’s createElement() function, but for some reason, IE will. So underneath that if statement, try adding in:

else {
var shim = document.createElement('iframe');
shim.setAttribute("id",shim_name);
shim.setAttribute("scrolling","no");
shim.setAttribute("frameborder","0");
shim.setAttribute("style","z-index:5;position:absolute;width:"+shim_width+"px;
height:"+shim_height+"px;top:"+shim_top+"px;left:"+shim_left+"px;");
}

And that’s pretty much it. I won’t guarantee that this solution is perfect, so best to save a copy of your original work before trying this one. Hopefully, this will help some frustrated and lost soul out there..