terriko: (Default)
I made an offhand comment about not wanting to drive a uhaul for 35 hours, and as a result several dozen people have independently contacted me in a variety of ways to ask what's up with that, and the tide does not seem to be slowing. I'm totally glad I have so many friends who want to know what's up with my life, but I'm pretty busy with thesis and I don't actually have time right now to answer all the questions I'm getting. So I'm sorry about the impersonal nature of this, but here's an FAQ:

Q: Did I miss the announcement?
A: No. I don't plan to make the formal announcement of my new job until I've signed the paperwork, but I promise that I will when that's all sorted out.

Q: What will you be doing? Where are you moving?
A: I'll be doing awesome things! Not here! It's a very open secret where I'll be going and what I'll be doing, but I'm hoping to tie up some loose ends before I make a public announcement.

If you see me in person, feel free to ask (I *love* talking about the new job), but please don't send me email/g+/fb/twitter messages any more. I wasn't prepared for the sheer number I've gotten, and I'm finding it surprisingly draining (see below).

Q: Why are you so cranky about it?

1. I've been working very close to 24/7 for the past few weeks in a bid to get my thesis into a defensible state, and was working 10hour+ days frequently even before that.

2. My supervisor decided that I need two complete extra chapters as well as major revisions on what I do have. Which is why the long hours and limited time off. And it's not going to get up for at least another week, probably longer.

3. While I like working with my supervisor in general, the one thing I actually dislike about working with him is his editing skills, which makes this even more frustrating.

4. I can't start the new job until I finish this degree, and they wanted me to start in July if it were possible. I currently can't defend until September due to university rules. The longer I wait, the harder it's going to be on both me and them when I start because of other things going on during that time period.

5. I have an ever-growing list of things I have to do before I leave the country. Including finding somewhere new to live.

6. It's stupidly hot out (~46C with the humidex) and I don't deal well with this weather nor with being cooped up to avoid it.

7. The constant questions and reminders that I'm moving away from all my local friends are making this especially emotionally draining.

8. I just had to spend time writing this instead of doing my job because a half hour on this was less time than answering all the questions individually.


Q: When are you defending your thesis?
A: I don't know. As the university requires it to be scheduled 6 weeks from submission date, we're looking at sometime in September. We can't schedule it until I submit my final copies, and I expect that will take at least two more weeks at this stage.

Q: How is it going?

Q: Can we come cheer you on in the defence?
A: I don't know, and I'm leaning towards no, since frankly the defence will likely be the most boring way I have ever presented my work. (Because, and I am not kidding here, I was actually told that my proposal was too readable, so I expect I will have to make the presentation intentionally more boring and "scholarly" for that particular committee member.) I'll let you know a week or two before the defence date when I've decided my preference.

Q: When are you moving?
A: Hopefully near the end of August. I've given notice here so it'll be on or before Aug 31, but I haven't found a new place there.

Q: How are you moving?
A: I don't know, but not a uhaul. I do have a small moving allowance as part of my contract, but I will be very surprised if it covers many of my expenses.

Q: Are you selling/getting rid of stuff before you move?
A: Yes, but I'm not fully sure of what until I've made actual moving arrangements.

Q: Are you having a party before you leave?
A: Yes, probably a drop-in affair like the cookie parties. I don't know when this will be because I don't know when I'm actually moving, but rest assured that it will be well-publicized, and you will have ample opportunity to see me before I leave. Or you can come visit once I'm settled in the new place!

Q: What if I have another question not covered here?
A: Please wait until I've announced my thesis defence date before asking, as I'll likely still be stressed out and irritated by questions until that time.
terriko: (Default)
This will surprise no one, but I am tired of writing thesis.
terriko: (Default)
As some of you may know, my last paper was on visual security policy (ViSP), a neat idea I had about how to add security policy to a website in a way that was more in line with how sites are designed. I based it on my own knowledge working as a web designer, as well as ideas from a variety of friends who have or do work in the web space professionally and not.

You can read my presentation the larger run-down or read the paper, but the idea behind ViSP is that it's sometimes very useful to subdivide pages so that, say, your advertisement can't read your password, or that funny video you wanted to embed doesn't get access to post blog entries, or whatever. Sadly, right now anything embedded in the page gets access to anything else unless some awfully fancy work has been done to encapsulate parts of the page. (And given how much people tend to care about security in practice, this doesn't get done as often as it should.) We currently just trust that any includes will play well, which is super awkward since malicious code can be inserted into around 70% of websites and you can't very well expect malicious code to play nicely.

Anyhow, I digress.

I'm updating this particular policy tool so that I can generate some policies to test, because I'm tired of building them manually, and my not-terribly-scientific method of clicking randomly on things to make policy has turned up a problem: what happens if you want to set policy for an element that's just one of many paragraph tags or whatever, not assigned an id?

With ViSP, we assigned an index based on how many such tags we'd seen, but I figured while I'm updating this surely I could find something more standard...

Turns out, no, that really is the best way to do it. At least according to the selectors API, which includes a nth-of-type() pseudo-class that seems to do pretty much what I want.

So now, if you're using my tool and wanted to define policy for a given tag, any given tag, we can make that work for you by building up a CSS selector to find it. Of course, it'd probably be cleaner to read if you only set policy on tags with ids or classes, but I don't have to require that as an additional hurdle to policy creation. I figure this is likely a net usability win when it comes to policy generation, and let me tell you, security policy is not a field known for usability wins. (So much so that if I google search for the words security policy and usability... I see a post by me on the front page suggesting usability studies on CSP.)

Anyhow... Thanks to having to learn querySelector earlier, I was already primed to create querySelectors for uniquely defining tags. Thanks Mozilla documentation! You're a terrific coding wingman, introducing me to all these awesome apis. ;)
terriko: (Default)
This is my (slightly cranky) record of building Firefox. I am reminded of why I don't do much open source dev directly on my mac -- documentation tends to be weak, and searching error messages yields many people being told by devs "I'm sorry, I don't have a mac to test this." Frustrating. Actually, I probably should have thrown more of the error messages into this document for those people... but I'm not going and breaking my build again to do that, so this is mostly for my own reference.

Mozilla does, a few layers deep, tell you that fink is not recommended for building Mozilla. It's buried in this document, but of course that came well after the "getting the source code" document which said fink was fine, and is surrounded by instructions on how to use fink. Oh well.

I had to upgrade fink to get Mercurial installed properly, so I'm feeling stubborn about it now and want to see if it can be done. So here's what I've had to do....

  1. Reinstall fink to get mercurial

  2. Get the source. Which takes a good long while, but takes even longer when it hangs the first time and you don't bother to fix it for an hour.

  3. Make a mozconfig file in the source directory. Mine currently contains:

    . $topsrcdir/browser/config/mozconfig
    mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ff-dbg
    mk_add_options MOZ_MAKE_FLAGS="-s -j4"
    ac_add_options --disable-optimize
    ac_add_options --enable-debug
    ac_add_options --enable-tests
    ac_add_options --disable-webm

    The very last line is because webm threw an error, and I didn't care enough to debug it just now.

  4. Then you can start trying to run make -f client.mk and see what breaks, such as webm as I mentioned above.

  5. You'll need autoconf2.13 because Mozilla is stuck in the past requires some features from it. The fink package is called autoconf2.13-legacy, and when you run fink -b install autoconf2.13-legacy it will install non-intuitively in /sw/lib/autoconf2.13 to avoid conflicts. I then added a link so that mozilla's default config file could find it:

    ln /sw/lib/autoconf2.13/bin/autoconf /sw/bin/autoconf2.13

  6. Next I was missing libIDL-2.0, which is libidl2 in fink. Yet another fink -b install libidl2 and some waiting.

  7. I thought my next problem is due to missing Java libraries, available from Apple, but it turns out that it was actually something else, so I have no idea if these are really necessary.

  8. The "something else" is that I don't have the 64bit libraries thanks to not having selected "64 bit only" when installing fink. Bank to reinstalling fink... *sigh*

    I'm awfully glad I started making this list, though, as I'm now going to have to go through it all again.

  9. Get some hideous error:

    IOError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but "10.5" during configure

    It seems related to this bug in python2.7, although it doesn't seem like it's python's fault so much as fink's if my python was build for 10...

    Fastest solution: uninstall python 2.7. Which uninstalls mercurial since it was based on 2.7, but I don't need to check anything in for a while and care more about having a functioning build atm.

  10. Over an hour of compiling later... Success! I can run TumucumaqueDebug.app (yes, that's Firefox) from obj-ff-uni/x86_64/dist -- not that this was helpfully given to me anywhere. After some fruitless directory clicking, I found it by searching for *.app.

Final mozconfig:

. $topsrcdir/build/macosx/universal/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff-uni
mk_add_options MOZ_MAKE_FLAGS="-s -j2"
mk_add_options MACOSX_DEPLOYMENT_TARGET=10.6
ac_add_options --disable-optimize
ac_add_options --enable-debug
ac_add_options --disable-webm
terriko: (Default)
I have a Firefox add-on I made several years ago to help me explore page composition and generate (theoretical) web security policies, and I decided to pull it out of storage and see if it could still be helpful. Of course, my browser decided to update Right Then, and I decided it wasn't worth fighting to stop it from doing so.

So I updated the add-on so that it included versions 5.* and actually, it mostly still worked (despite having been written for, I believe, a very early version of Firefox 3, or maybe a late version Firefox 2? This is one of my earliest add-ons.) except that apparently hasAttribute/getAttribute doesn't exist anymore.

I can't seem to find anywhere telling me that they've been deprecated, and more importantly, what I should be using instead, which is irritating. But the end result is that it doesn't work, so I needed to find something else. It looks like the solution for at least some of my code is to instead use a querySelector to look for all elements with that attribute.

Of course, I never seem to want to do exactly what the darned examples show. So in case you're like me, the way to search for any tag with a given attribute using querySelector is like this:


And if you wanted to search just a specific type of tag, then you'd specify that instead of *. So if you were looking for the alt tags for every image, you'd do...


But I'm concerned by this note in the querySelectorAll documentation, which tells me that it "Returns a non-live NodeList of all elements descended from the element on which it is invoked that match the specified group of CSS selectors."

There's a big warning elsewhere that it's non-live too, unlike other such methods. So my questions are... why is it non-live, and what do I need to do to get a live list? For my particular purpose at the moment I don't think I need it to be live, but for some of the older code that I might want to update in the future I probably do.

I'm mostly just recording this for my own reference later, but if someone happens to be able to tell me if there's another function that more directly replaces hasAttribute, or there's a good way to get a live list of elements with a given attribute, I'd love to know!


terriko: (Default)

February 2017

192021 22232425
26 2728    


RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 23rd, 2017 02:18 am
Powered by Dreamwidth Studios