astradele

Archive for May, 2005

Ematei - Japanese restaurant

Posted by GJ on May 31, 2005

Ematei came highly recommended to me for its ramen. “70% authentic Japanese”, or somewhere thereabouts.

I was a little surprised when the ramen wasn’t on the lunch menu, but I was able to ask for it specifically. It came with some gyozas that were pretty standard fare.

I must say, although the noodles look like your regular Japanese instant noodles, they tasted quite different (of course!). A more substantial texture, not really chewy, definitely not mushy, quite appealing. More interesting than Izakaya Ramen and cheaper.

I’ll have to give it another go though. I ended up with the miso based broth, of which I’m not fond of. The distaste distracted me from trying to decide if I liked the ramen itself. Funny that I like miso soup.

Posted in everyday | Tagged: | No Comments »

Quest for the authentic ramen

Posted by GJ on May 29, 2005

I like eating. Specifically, I like eating out at new and interesting places, for new and interesting types of food. My latest attempt, at Izakaya Ramen on Front St., Toronto, left a lot to be desired. I have it on good authority from my dinner partner at the time, it was not authentic in the slightest. Since I hear everyone rave about “real” ramen, I’ll have to keep trying.

I’ve also been thinking about setting aside a certain day of each week to go out to a new restaurant. I think Monday or Tuesday evening would work, since those days are typically the least busy for restaurants.

Then again, such a habit would run contrary to my concerns about gaining weight. :)

Posted in everyday | Tagged: | No Comments »

Programming languages

Posted by GJ on May 26, 2005

I was at a (pretty boring) course the a couple days this week, and also madly trying to get some stuff done for my moonlight job, so that disrupted my attempt at keeping a regular pace of blogging up.

Something I think would behoove most programmers is to learn at least one or two other programming language families. Java and C# are too close. Smalltalk or Lisp on the other hand. It comes down to one general idea…

Experience with new ideas is part of it. Each language has its idiosyncracies that are sometimes useful elsewhere. But the most important value is when one tries hard to understand why the language or framework designers did as they did. That’s the real eye opener. Too many people see something unfamiliar or that doesn’t make immediate sense and proclaim the designers and implementers brain dead, kludge it, and move on.

This is usually a mistake. Not only does that person make inefficient use of time by trying to fight the environment that’s supposed to improve productivity, it’s missing a meaningful learning opportunity. Realistically, even if the designers are less intelligent in every way (unlikely), they had much, much more time to consider the problem space. So it’s totally worth taking time to pause and think about it differently. Instead of thinking “this is stupid, I can’t get it to do what I want it to do”, wonder “under what conditions could this solution possibly make sense?”

It may very well be that the designer missed something. It may be that there is a serious flaw. Showing that helps the designer learn something. But looking for the designer’s error first, and stopping there, misses all the opportunities to learn something in those cases where in fact the designer was right after all. And those opportunities are a delight, because it’s almost as good as having a dedicated mentor, older and wiser, right there explaining and teaching you tricks of the trade.

Posted in techie | No Comments »

TD Waterhouse tinkering

Posted by GJ on May 23, 2005

I do my own stock investment and purchases. One great read for ideas is TD Waterhouse’s Newcrest research, which it makes available to those who have brokerage acounts with them. One has to log in to their website, navigate a few pages, and then look at the reports one at a time.

Two annoyances for me: 1) I don’t remember to log in everyday and check, and 2) the session timeout for the website is 15 minutes so that I have to log back in after reading a longish paper.

Being me, I can’t stand anything to do with computers and not being able to do something I believe should be possible. I don’t want to navigate the website and read the PDFs one at a time, I’d much rather have it automatically be picked up and sent to me via email, which I already have a habit of reading.

So after a few hours in the dead of night, and several more after some death-like sleep, I finally hit upon a setup that works for me. Here’s what I learned:

On my side

  • wget doesn’t support saving session cookies between calls
  • curl is a more powerful and flexible tool than wget
  • LiveHttpHeaders is a Mozilla plugin that lets one see exactly what the browser is sending and receiving - better than a logging proxy, for HTTPS purposes.

On TD’s side

Their process to get to the market research goes something like this:

  1. Copy the user values in the login form to a hidden form on the same page, and submit that instead. The hidden form has an authorization token that is generated everytime you read the front page, so you can’t just submit the form as the first step. Get a session cookie for your troubles.
  2. Get a pointless page where TD says they’re loading your profile. All it seems to do is reload to the user’s start page.
  3. From the start page, load the MarketsAndResearch page. It looks like we get another kind of cookie for our troubles: skipping this step yields “session timed out” messages. This yields a page composed of a few frames: header, side bar, and the main content page.
  4. Here’s where it gets a little weird. On loading the main content page, you get back an unusual hidden form. It’s prepopulated with a magic number (the form value is called “magicno”), other form values called Blob1, Blob2, and Blob3. Blob3 is empty, but Blob1 and Blob2 have a really long string of characters in each (300+?). It posts this to some other server, www.tdcanada.wallst.com, and an ASP page. Said ASP (ASP.NET according to the HTTP headers) takes the magic values and gives back a redirect page. The redirect page has a few query parameters that identify you to the redirect target. Get a session cookie (presumably for this wallst.com server) for your troubles.
  5. After that, it’s pretty straightforward. All the session cookies have been obtained, it’s a matter of parsing some HTML and javascript function calls to figure out which URL and what query parameters to use to get the report for the day you want. It’s a bit obtuse; the first call to get a report creates a window that calls a different URL (with similar arguments), and that window calls some “cgi-bin/upload.dll?” URL to finally get the PDF.

Applying a little reasoning, it looks like TD decided on a Java general portal, but their research people are running ASP.NET. So the Java portal goes to the trouble of contacting the ASP.NET server behind the scenes, agreeing on some magic values, and then giving the browser these values use on the ASP.NET server. The ASP.NET server then knows that the user has been given the thumbs up already by the main portal. The ASP.NET server then tells the browser to go to a certain place, with a certain number in the query parameter, to get the session cookie.

Put that way, sounds like some kind of back-alley deal. :)

In the end, I’m just happy I was ultimately successful. Other than the learning experience, spending this much time to solve such a small amount of manual labour seems pointless; I’m happy to have done it for the knowledge though.

I must admit, the TD website is a little more “kludgy” then I might have imagined. I was particuarly surprised that their site causes IE to prompt the user about a potential security breach, because TD is reusing an SSL certificate that’s for a different TD server.

Posted in techie | No Comments »

Meow!

Posted by GJ on May 22, 2005

Sometimes I wonder why I like cats so much. After all, they’re often selfish, demanding, and lazy. One answer: times like today, when one is stretching her paw out of the closet at me, waving frantically trying to attract my attention to let her out after I accidentally locked her in. Cats can be so cute, even spoiled, ill-behaved ones like mine. :)

Posted in everyday | No Comments »

Cat owner

Posted by GJ on May 21, 2005

I have a pair of cats (or a pair of cats have a human - me). I must admit as much as I love cats in general and mine in particular, I’m sometimes a little capricious. I caught up to one of my cats hiding in the closet while I was vacuuming, and the little devil on my shoulder prompted me to vacuum her fur coat. She panicked and leapt about, but it being close quarters, it took her a few tries to figure out the exit. Mean, yet somehow amusing.

I like to think I’ve generally made her happy though. After all, she has gone from this:
My cat before I was the owner
to this:
My cat after I was the owner

According to her records, she’s undergone a 96% increase in weight on my watch - and she was already considered an adult when I got her. ^_^

Posted in everyday | No Comments »

Technical seminars

Posted by GJ on May 19, 2005

I attended a couple technical seminars today. One was pitching what’s basically a rapid application development platform - basically a canned, integrated set of solutions for common enterprise application problems. Like VB is to languages, so this was to applications. The other was on service oriented architecture: pros, cons, directions.

On the surface, I have to admit I’m technically snobbish enough to get a little irate at one can see cosmetically. Blah blah, our product can do anything, blah blah, service oriented architecture will butter your bread.

However, that attitude stems from arriving at the seminar with an attitude of “make me have to believe you”. Another attitude I find much more useful is to ask “why does he think that?”. “Because he’s stupid” is not an acceptable answer. At worst, “he fell into a trap that I know is a trap because I’ve seen that trap up close myself before”. Even if you don’t agree at the superficial level, you can turn up some interesting things.

For instance, in the product seminar, I think the product is being pitched as more than it cna really do. However, the way the product is being pitched, and hammering home the claim that Java and .NET projects would never be as productive as with this tool made me think: it’s true in a way. As our application needs get more advanced, our tools aren’t advancing as fast. Sure, the main programming languages advance… but since when was the human response to increasing adversity to concentrate on improving our general capabilities? We specialize, and develop tools that are really good for a narrow problem space. And this, I think, is the brilliant vision of the product I got from the product seminar. Sure you could do it in Java or .NET. But it’s like building a house by learning carpenty first to make the boards, then smithing to make the hammers and nails, then architecture to design it… That company realized there was a gap: on the one end, we have very complex goals; on the other end, we have tools, but they address such a basic complexity level (hammers and nails) leaving a big gap that still has to be addressed (architecture).

Wow, that was longer than I thought it would take to say. At any rate, I’m glad I went (and not only because the breakfast was good!).

Posted in techie | No Comments »

Sarah McLachlan concert

Posted by GJ on May 18, 2005

Quite enjoyed the Sarah McLachlan concert tonight. Gave a new appreciation of the canned music - maybe it’s seeing the artist smoothly start into the music, rather than digital abruptness.

It alleviated a lot of day and moonlight work stress. The opener was good, too: a group called The Perishers from Sweden. Their CD was only $10 there, so I picked one up. Too bad the lineup for signings was so long.

Sarah sang with the Perishers for one of their songs:
The Perishers

Sarah et al. in of the cozier stage setups:
Cozier song

Sarah and the Perishers singing:

Building a mystery

Posted in everyday | No Comments »

Free way to email really big attachments

Posted by GJ on May 18, 2005

YouSendIt looks legit, but I haven’t tried it myself. It professes a 1GB maximum, and it’ll host your file securely for you, emailing the recipient that he/she can pick it up. Not sure what their business model is, but if it’s as advertised, that’s a useful site to remember.

Posted in techie | No Comments »

Politics and tech : never the twain shall meet?

Posted by GJ on May 17, 2005

I’m really starting to miss being a techie. At least there, there’s some level of minimum objectivity (does it work?) that one can count on.

I thought I asked for something pretty nicely, and it really was for work that I’m not best suited for. I suspect, however, that the recipient was deliberately looking for a negative way to interpret it and saw it as an attempt to offload work to someone else.

That part doesn’t bother me. It’s the not so subtle rejection. In fact, I’d suspect that I was being told off, but with words that still yielded plausible deniability. However, thinking of it that way won’t help me keep an open mind.

I guess this is good for me - it takes all kinds to make the world go ’round. But does it ever feel nasty in the moment.

Posted in techie | No Comments »