Monday, May 30, 2005 - 23:13

Javascript help?!

I need some javascript help. I'm trying to modify a script that I found on the web; all it does is load the specified url into the specified iframe. What I'm trying to do is make it take a list of iframes and a list of urls, and load each url into its corresponding iframe. This is proving surprisingly difficult, although admittedly I know effectively nothing about javascript.

This is the relevant portion of my script so far:


function loadintoIframe(frameids, urls)
{
var id_list = frameids.split("~")
var url_list = urls.split("~")
for (i=0; i < id_list.length-1; i++)
{
if (document.getElementById)
document.getElementById(id_list[i]).src=url_list[i]
}
}


The parsing works; and if I comment out the loop and manually load either id_list[0] (and url_list[0]) or id_list[1] and url_list[1], it works fine. If I manually load id_list[0], url_list[0] and then manually load id_list[1], url_list[1] it works fine. It's only when I try to load both in the for loopthat it doesn't work - only the first one gets loaded. I've run it through a javascript debugger, and both statements are being executed; it's just not actually loading the second time round the loop.

What am I missing? It must be something basic ... Please, if you have any idea why this might happen, let me know!

Labels:

VisualStudio 2005 Beta 2

Yay! Today my copy of VisualStudio 2005 Beta 2 arrived!

I was quite impressed - it was couriered to my door by DHL, despite the fact that I requested it (free) when I registered for the Beta Experience (SA only, sorry - the rest of you guys have to pay for it :-)

I haven't installed it yet, but I'm looking forward to it ... I've had a pretty good overview of some of the new C# features (nullable types, which are a brilliant idea; generics, which would have come in quite useful in my last project; anonymous methods; etc) and I've seen a couple of the new IDE features (intellisense in particular looks much improved), but I'm eager to see the whole range of new features ...

I'll keep you updated!

Labels:

Saturday, May 28, 2005 - 23:24

Laptop Specs - comparison

This is a comparison between the Dell I've ordered (but will cancel, if it seriously is only going to be arriving in August) and the Acer I'd probably have to end up getting instead :-( Note the difference in weight and battery life ... oddly enough, the Acer is worse for both (I could understand heavier battery = more battery life, but not heaver and LESS battery life!)

I suspect that their system is just really bad at estimating delivery dates, though - or maybe the order and delivery dates are in different formats (d/m/y vs m/d/y) - because yesterday it was in pre-production, waiting for parts, but today it's in production, which means it's being assembled. Then it just needs to be tested and shipped, and I don't see that that can take 2 months!

Update - as of today, the status is back to pre-production! How does that work?! I think their online order status tracker is well and truly not working :-(


Dell Latitude D510Acer TravelMate2701LC
ProcessorPentium M 740 (1.73GHz)Pentium 4 2.8GHz
Memory512 Mb DDR2512Mb DDR SDRAM
Display15" XGA TFT LCD15" XGA TFT LCD
OSXP ProXP Pro
FSB Speed533MHz400MHz
Expandability1 x Type I/II PC Card slot1 x Type I/II PC Card slot
Expansion PortsParallel, Serial, VGA, S-Video Out, IEEE1394, 4xUSB 2.0, IR(IrDa v1.1), RJ-11, RJ-45, docking connector 4x USB 2.0, VGA out, RJ-11, RJ-45
Hard Drive40 Gb40Gb
RAM Speed400MHz333MHz
Cache2Mb512Kb
Optical DriveDVD/CDRWDVD/CDRW
Graphics CardIntel Graphics Media Accelerator 900 (128Mb shared video memory)ATI Mobility Radeon 9000
Max Resolution1024x7681024x768
Audio in/outheadphone/speaker outLine in, mic; headphones, sound card, speakers
ModemInternal 56K modemFax Modem ITU V.92 K56Flex
Network10/100 Integrated Ethernet LAN, Infrared PortFast Ethernet, IEEE802.11g, Integrated 10/100, Infrared Port
Battery6 cell 'Smart' Advanced Lithium Ion with ExpressChargeLithium Ion
Battery Life53WHr1 hour
Width/Depth/Height338mm x 273mm x 35.5mm1.4/11.4/1.8 (inches)
Weight2.4 kg3.4 kg
Input MethodsKeyboard, touch padkeyboard, numeric keypad, scroll button, touch pad

Labels:

Laptop Delay :-(

I got the order number for my new Dell Laptop today, and went to check the estimated delivery date - which is 6 August! That's just insane - the quote said 10 to 14 days, so two and a half months seems a bit excessive. I'll get hold of them on monday and find out if that estimate really is right - and if so, I want to cancel my order.

It's a pity - that laptop had pretty much everything I wanted (except a really hi-res screen, but I could live with 1024 x 768). The other one I'm now looking at is the Acer Travelmate 2701LC, but it's not as good, not as configurable, and weighs almost a whole kilogram more :-(

Darn.

On the good side, I went to the SA Developer May Meeting this evening, which was fairly interesting, and I got some cool stuff - a SA Dev t-shirt, a copy of "Writing Secure Code", and a radio that looks like a mouse. We mostly went over the new C# features, most of which I'd seen at DevDays but had half-forgotten already, so a refresh was really useful.

Average happiness rating for the day: 2 bad points, 1 good point: averages out to so-so, I guess.

Labels:

Thursday, May 26, 2005 - 14:11

WTF?! explained ... barely

So it turns out that the idiot was complaining about my blog URL being in my e-mail signature. When I posted the "TAKEN" message, I just left the message body blank - except that google reasonably inserts your sig into the message. So in reply to my e-mail to him asking what the problem was, he complained that (and I'm editing out the bad language here) nobody's interested in my blog, and why do I think that I can use freecyle to advertise it. So I'm guessing that maybe he didn't bother to read the subject of the message, or just jumped to conclusions.

Maybe he was having a bad day and just overreacted.

Or maybe he's just an idiot.

Labels:

Wednesday, May 25, 2005 - 23:45

WTF?!

Time for a bit more cathartic blogging, otherwise I'm not going to get to sleep tonight. I don't really know why I've let this idiot annoy and upset me, but here's the story:

There's a group called Freecycle, and they've set up a local group here in Cape Town. They hang out at Yahoo! groups, and the basic concept is that if you have something you don't want or need anymore, well, there's someone else who does. So instead of trying to sell or swap stuff, it's a forum where you can give stuff away to anyone who asks for it. They tend to be biased towards charities and non-profit organisations, understandably, but anyone can take stuff.

The way it works is, if you have an item to give away, you send a message to mailing list with the subject line "OFFER: (item), (location)", and then whatever describing the item in the message itself. People then e-mail you, you decide who the item goes to, and between the two of you you sort out how to get it to them. When it's gone, you send a message with the subject line "TAKEN: (item), (location)", so that everyone knows it's gone and they shouldn't bother asking for it.

So fine, in theory. Since I bought the recliner, I've had a spare armchair sitting around taking up space that isn't really there, so I thought I'd put it on Freecyle. I must say, I got an amazing response - easily 20, 25 people asking about it! I gave it to a couple who run an ARP&P branch (an association for the aged) who wanted it so that the older people who come to the office at least have somewhere comfortable to sit while they're waiting. I thought it was a good cause . So they came to pick it up tonight, and it all went very well, and really, I'd recommend Freecycling if you want to get rid of stuff that someone else might find useful. So I post the taken message to the mailing list, e-mail all the people who e-mailed me, and feel like I've maybe done a good thing, and saved myself the hassle of getting rid of the chair to boot.

Except that then I dial up a bit later, to find two e-mails from some guy in reply to my taken message - the one says, "Moderators, are you going to do anything about this?!" (that may not be an exact quote, but that's the gist of it), and the other says, "You know, nevermind. Unsubscribe!".

WTF?!

I just don't get what the guy's problem is. I didn't do anything wrong! If you're going to complain about someone, at least tell them what you're complaining about! So I e-mailed him back, asking what the problem is, and either he'll come back to me or else I guess the moderators might reply, but I really don't need this ... I did something nice, gave a chair to a non-profit organisation, and I get hassled about it? I don't know why this is bugging me so much, but it really is. I guess I'll just have to wait for his reply.

That aside, I'd really recommend Freecycle - just try to avoid falling foul of the idiots.

Labels:

Tuesday, May 24, 2005 - 00:22

I Hate Telkom

Now I know that this is a common sentiment, as expressed by Hellkom.co.za, and various blog entries, but Telkom really, really sucks.

I mean, really, really sucks.

Telkom is the only landline service provider in the country, so we're pretty much stuck with them. And as I mentioned before, we pay, per second, with a minimum fee, for local calls. So even if you're only on the phone for 30 seconds, you still pay a base fee equivalent to several minutes.

That's bad enough, but ...

I also use Telkom as my ISP. They used to be not too bad, but lately it takes at least two dial-up attempts before I can connect to the net (remembering that I pay the minimum call fee even for a failed attempt), and then generally it takes a really long time to communicate, send the username & password, verify the username & password, etc. And Telkom the ISP doesn't gain from the delay, but Telkom the landline company does. So it seems like a bit of conflict of interest to me - I'm sure that they deliberately slow down the sign on process, and occasionally connect at extremely slow speeds (I'm talking 4800 bps, instead 56Kbps), just so that they can make more money on the landline side.

That's bad enough, but ...

As of about 16:50 or so this afternoon, while I was connected, I started getting DNS errors. I thought maybe I'd been disconnected on their side (my modem still looked happy), and this was during expensive call time, so I thought I'd try again later. At about 21:30, same problem. Again, remember that it costs me to dial in, go through the sign on process, try to access some pages, and see that they can't be found. So each time I think "They must have fixed it by now", and want to try, it's going to cost me.

That's bad enough, but ...

Their freecall helpline only operates during office hours.

That's bad enough, but ...

I phoned another ISP who is friendly enough to actually provide a helpline that is available 24 hours a day, and they don't have any problems. So it must be a Telkom specific fault (not like that's any surprise).

That's bad enough, but ...

I find their 24 hours technical support team number (which isn't in the phone book - you have to find the original letter they send you when you sign up with them, since you can't access their webpage!). Note that this one isn't a freecall number. It's engaged. Try again - it rings twice, then just goes silent. Try again, don't ask me why I bother - rings twice, then goes silent.

So there's no internet, no-one else has a problem, I can't check their website for the current status since I can't go anywhere on the net, I can't get hold of their technical people to either report the problem or find out when it's going to be fixed. All I can do is keep dialling up, seeing if it's been fixed yet. And pay for it each time.

Can you say "money making conspiracy"?

Labels:

Monday, May 23, 2005 - 12:59

Website Progress

So I've decided on the look for my new website, and I'm actually really happy with it. I seriously miss my laptop, and I'm really glad that I decided to order one, because it's much more fun to work on the website while I'm sitting downstairs watching tv in my comfy (if not-so-much working) recliner rather than sitting upstairs at my pc on a decidedly un-comfy typist chair.

And I really miss the DSL connection - dial-up sucks. I keep forgetting to look at something while I'm connected, and then I can't wait until later when I know I'm going to dial up again; no, I have to go and dial up right away. Telkom is so gonna love me this month. For those non-South Africans reading this: DSL is majorly expensive in SA, so most home users use dial-up, where the monthly fee is smaller; the catch is, we pay for local calls as well, so every second you spend on the net is costing you. It's cheaper in the evenings and over weekends, but still.

Here's a rough screenshot (think cardboard cutout type prototype) of how I plan for the site to look. I'd appreciate any comments or suggestions, since I'm really not a graphic designer or anything close!



While I'm asking for advice, where should I get this website hosted? I'm really not bothered about getting my own domain, and I don't need much in the way of storage space, scripting capabilities, or anything fancy. What I'd like is ftp & browser upload facilities, and a minimum of advertising (I don't mind adding text or images to my page, but I'd really like to avoid popups, banner ads, and other equally annoying techniques). Oh, and did I mention I'd like it free? :-) Yeah, I know, but I hate being committed to paying $s for something that I'd like to be at least semi-permanent, when I don't know what the exchange rate is likely to be doing. Any suggestions?

Labels:

Saturday, May 21, 2005 - 20:58

Quoth the Raven, Nevermore

So yesterday was my last day at my old job. It was hard, and it was sad - I mean, the day itself was great fun, there was no work for me to do so I just hung around and distracted the other guys from their work :-) - but saying goodbye was hard, especially because the two guys there who I consider friends rather than just co-workers (Dilbert moment - almost couldn't resist typing "cow-orkers") are both leaving for London soon. We'll be in contact, but it won't be the same as seeing them every day.

I'm sure that to a lot of people it seems odd, being sad at leaving your job - but I was really happy there, and we had a good group of people, and it's always sad to see something like that break up. I'm sure that my new job will be great, and that it's a good career move, and that I'll make friends there - but it's an ending, and endings are always sad for me. In this case, the ending is followed by a beginning, and I'm sure it'll be good.

When the four of us resigned, the rest got together and gave us farewell cards, and everyone wrote a little message inside - but we didn't get to write messages for each other, and obviously not for the people staying behind (except that I got Dave and Jochem to write in my card afterwards - thanks, guys :-) So, even though I said goodbye to them all yesterday, here's a goodbye message for them. If you guys come across this page and read it, good; if not, well, at least I got to say it. Ah, the catharsis of blogging.

Tomasz, Trevor, Farrel, Amanda - it's been great working with you guys, and I wish each of you individually, and the company as a whole, all the best. I hope the new company does well, and that you're all happy there. If not, give me a shout - I know some good recruitment agencies ;-)

Keith - I'd say you were the best boss I've ever had, except that you're actually the second boss I've ever had, so that wouldn't carry much weight :-) Your management style was awesome, and you got the job done with a minimum of beaurocratic inteference - even if you did make us do design docs and unit tests and post mortems ;-) I hope that whatever you decide to do works out well for you, and that if you end up working for another boss, that he's as good as you were.

Jochem - thanks for being a friend, especially for giving me good advice when I was freaking out a couple of weeks ago, and even more for the even better advice yesterday. Good luck for London - I expect regular updates on how it's going, and what the current state of the job market is :-)

Dave - It's been a hectic year and a half, and thanks for being a friend through it all. It's been fun! Best wishes for London, enjoy the Belgian Grand Prix, and don't forget to send me photos of it :-) I know we'll keep in touch via e-mail and msn, so this isn't really goodbye, but I'm gonna miss seeing you at work every day, and it'll be strange to have no-one complaining about incompetence ;-)

So Dave, Jochem, I'll see you in London, maybe late next year, but keep in touch. The rest of you guys, cheers, and I'm only an e-mail away if you want to keep me updated on the latest tps stats :-) I'll miss you all, but I think I'm going to miss my laptop and the DSL connection the most .... <grin>

Labels:

Thursday, May 19, 2005 - 15:13

Website Design

So I mentioned that I was redesigning my website, except that it's more like creating a new website. I have a particular style in mind, and I thought I knew how I was going to achieve that.

Basically, what I want is something like the Blogger admin pages, where you have a constant header, a page of tabs at the top, and the content changes according to which tab you've selected. Now I can simulate this pretty easily, but that means that I have to have lots of html pages with the same content - a pain, when you want to update it. So what I want to do is essentially have just one page which contains the header and the tabs, and then some way of dynamically loading content into the ... well... content part of the page. So I could put a mailto link in the header, and if my e-mail address changes, I only have to change it in one place. Or if I want to change the tab images or the number of tabs, again, only one page is affected.

I thought I found a good way to do that, using IFrames and this script from Dynamic Drive. It does exactly what I want, by allowing to me to load content into the IFrame based on which link is clicked. How to indicate which "tab" is currently active I hadn't quite figured out yet, but I thought I'd get to it later. Right now, it looks like it may be academic since the script seems to have a downside.

In IE, it gives me a security warning. Now this could just be because my security settings are relatively high, but I don't want people to have to disable their security to view my site, even if it is on a per-site basis. I just don't think it's a good idea, and I don't think people will want to do it.

In Firefox, it doesn't even work. The link just doesn't load the content into the IFrame. Whether this is a security issue, or whether the script just doesn't work with the latest version of Firefox, I don't know. But I use Firefox pretty much exclusively, and I hate - no, abhor - sites that only work in IE. So if I can't get it to work in Firefox, with relatively high security settings, it's not going to happen. Ah ha! Just found the problem - the name of the frame is context sensitive in Firefox, but case-insensitive in IE!

I'm not very up to date on website design and implementation; the last time I created/updated my site I did it by hand, editing the html in notepad. Okay, I exaggerate - I used Netscape Navigator's editor, but that's almost as bad. Image maps are about as sophisticated as I got. So there may be a much better way to accomplish what I'm trying to do, except that I don't know about it. I'm sure it must be a pretty common problem, and I'd guess that people out there must have solved it; short of randomly browsing until I see sites that look the way I want mine to look, and then trying to figure out how they did it, I'm in the dark. Any ideas?

Labels:

Wednesday, May 18, 2005 - 22:34

A surprise return

Yeah, so I haven't been blogging much. There's a bunch of reasons - it seemed pretty pointless, since I don't know if anyone's reading this stuff; dial-up internet is annoying; I've been pretty busy; I haven't had much to say. So here's a quick update. I'm in the process of buying a laptop (a Dell Latitude D510 - any opinions on this model?), so I'll be able to blog more often. Maybe. It'll be more convenient, at least.

So, an update. Well, I resigned from my job about 4 weeks ago, along with 3 other of our top developers, which leaves just 4 people. I have a new job, though, at a company called Peresys (oddly enough, just down the road from my current company), and it looks like it'll be a bit hectic and challenging, but a really good place to work. I'm really sad about leaving ATC, and I'm going to really miss the friends I made there (who are mostly going to London - I may follow them in a year or two). It's sad, but I know I made the right decision. Hopefully I'll make good friends at my new company too - it just takes me a while to relax enough around new people to the extent that I can just be myself :-)

I went to DevDays yesterday, along with most the guys I work with - it was pretty interesting - the new C# features look really cool, and I had a really fun day. My take on the tech aspects are pretty well summed up in Dave's blog on DevDays (yeah, I'm just too lazy to write what I thought about it, but I agree with pretty much most of what he said).

Hmm, what else? The bike's going well - there was a whole saga a month or two ago, when it went in for a simple gasket change and I didn't get it back for almost two months, but I don't want to get into that. I'll just annoy myself again for nothing :-) I've been going for driving lessons every Saturday, as well, and I think I'll do okay on my test (9 June, in case anyone wants to wish me luck). Once that's done, I want to go for my big bike licence (I'm currently limited to <= 125cc), but that's a pain because I have to write the learner's test again too, and there's such a long waiting period.

I'm redesigning/creating a new website - I've been saying that for ages, but now I'm actually making a bit of progess in that I know how it's going to work What it's going to say, I still don't know.

The recliner that I blogged about before is in the news again - the linkage between the reclining mechanism and the lever that you pull to actually make it recline is broken. So they want to send a service guy out to fix it. After all the problems I had before, I'm not too impressed with this idea, but what can I do? Apart from never buy anything from Tafelberg Furnishers again ...

I guess that's it - it seemed like a lot more living through it, but I guess that's a basic summary of my life over the last few months. Of course, if I went into all the icky details it would be lot longer :-) I intend to blog more often in future - and I always *mean* to blog about interesting websites and coding problems and stuff like that, but somehow I never get round to it (at this point I feel like inserting some pithy comment like, "those who do, do, and those who don't, blog about it -- but I'll resist the temptation).

I'll leave you with some interesting DIY links (i.e., look it up on google - I'm on dial-up, go find your own links :P)
  • I'm currently reading "1610", by Mary Gentle - excellent book, I'm really enjoying it.
  • I'm going to buy "Earth, Air, Fire, and Custard', by Tom Holt, as soon as it comes out in paperback (I have the first two in paperback, want to maintain the look of the collection)
  • If you haven't seen it before, check out ToxicCustard's How to Destroy Your VCR - excellent viewing, and may give you some ideas about how to deal with annoying office equipment
  • Check out Bruce Schneier's blog, or read the monthly version, CryptoGram
And at some point, I'll actually add my list of visited-daily websites to the links section that should on this page somewhere.

Labels: