Log in

No account? Create an account
Ramblings Journals I Read Calendar The Dirt MegaZone's Waste of Time Older Older Newer Newer
Long weekend - MegaZone's Safety Valve
The Ramblings of a Damaged Mind
Long weekend
Well, I figured out a different implementation for that PHP problem. Officially Cyphermint closed at 15:00 today, I stuck around to redo the PHP implementation and test out my new plan. I just finished a fair bit of testing and it seems to be working. PHP's DOMXML is slightly quirky, and not as friendly as, say, Perl's XML::LibXML. Perl lets you use XPath in a lot of the methods, turns out PHP doesn't. For example, in Perl you can pass findnodes() XPath. In PHP you shouldn't pass get_elements_by_tagname() XPath. Now, you'll find examples that show that - but I found a bug report over at PHP.net with a reply stating that while that may have worked it is in correct and you should always pass it a plain tag name. So some of my troubles stemmed from the fact that I believed the examples I found, and PHP's DOMXML documentation *SUCKS*. It is mostly incomplete, or very light at best. So I wrote my own function which behaves more like findnodes() and reworked things.

My boss has decided that I must be in by 10:00 every day, and has reinforced that by scheduling a daily meeting for 10:00. I'm not really happy about that. Yeah, OK, 10:00 doesn't sound that early - but I'm a vampire, I have trouble getting to sleep before midnight. I'd been coming in more like 11:00, sometimes closer to noon when I'd worked later the previous night. Now I'm managing to get up, but only by setting one alarm for 08:00 and the other for 08:30. The earlier i try to get up, the more lead time I need to give myself to *really* wake up and get rolling. So I lose even more sleep by needing to have a longer 'snooze' zone, or risk being late. If I could just jump out of bed with the alarm I could get up at 09:00, but I don't work that way. Usually the first several snooze cycles I'm totally incoherent, kind of having waking dreams. The alarm is just noise and it doesn't mean anything. It'll take me a few rounds before I start to recognize it as an alarm, and then some more to realize that means I need to get up and go to work. Worst case I am so tired I'm still late because I get into a kind of waking dream where the alarm is part of the scenario and I either turn it off completely, or keep hitting snooze for hours. When I finally snap out of that I always feel totally disoriented.

Anyway, my body seems unhappy with this and in retaliation has been messing with my sleep cycles. My insomnia seems to be gone - instead I'll just wake up every few hours. Then in the middle of the day I'll suddenly become massively sleepy. Or it'll just hit me randomly and I'll go from feeling wide awake to feeling like I'm going to nod. Lots of fun when I'm driving.

So I'm happy to have 4 days in a row off. My big plans for the holiday center around SLEEP! No alarms, turning off the phones, etc.

Getting the PHP working was important for me too - because if I hadn't fixed that it would've plagued me all weekend. Lately I've been waking up from dreams about code way too much.

I am: relieved relieved
Current Media: Tempest 2000 Sndtrk. - Hyper Prism

tarzxf From: tarzxf Date: November 26th, 2003 07:33 pm (UTC) (Direct Link)
Have you tried getting a sleep study? Do you snore (or have been told so) or stop breathing? Look at everyone else int eh group.. slarti and z_gryphon have CPAPs, and have shown SIGNIFICANT improvements in almost every way.

I even recently had surgery to stop my sleep apnea; painful, yes, but SO worth it. I no longer drag through work, sleeping away most of my lunch hour, annoying those around me by never seeming to want to do anything other than crash in front of the TV, then off to bed to start it all over again.

The magic nose machine did not earn it's name as a joke.

-- A Concerned Friend
ardaniel From: ardaniel Date: November 26th, 2003 10:18 pm (UTC) (Direct Link)
Actually, what Neal said, but you might want to consult with a sleep specialist even if it *isn't* typical obstructive or central apnea. There are sleep syndromes-- "it's only a disorder if it fucks up your quality of life" ;) -- that involve not being able to get to sleep until around midnight or two AM, and only feeling rested if you awaken late in the day, which sounds a lot like what you're experiencing.

Invoke the benefits, piss off and please the boss all at once by saying "sorry, can't make the 10am because I have an appointment with a specialist to discuss my sleep," and see what happens. They may be able to shed some light on your sleep patterns and help you find better ways of coping, even if that's just a letter to your job saying "Piss off, he has a legitimate problem and he'll be more productive if you just let him get away with this."
From: twistedraisin Date: November 26th, 2003 08:36 pm (UTC) (Direct Link)
PHP's DOMXML is quirky because the version of libxml that it uses is quirky... PHP5 moves to libxml2, which is much more... what is the word... I dunno. It's nicer to work with. It does't do random dumb things for which there's no PHP solution because the problem is in libxml.
zonereyrie From: zonereyrie Date: November 26th, 2003 08:43 pm (UTC) (Direct Link)
The current versions use libxml2 - I don't have anything but libxml2 on one of the boxes I'm testing on.
From: iwascaite Date: November 26th, 2003 08:39 pm (UTC) (Direct Link)
You do keep your alarm clocks across the room, right? It's amazing how much that really helps.

There are some other things that might help, like drinking before sleep so when you awake there is an enforced activity (make sure to put the lights on).

For a while I set the bread machine to go off right after my alarm, it made the most irritating noise and the smell of the bread was an incentive.

Really the best thing is to set a schedule and stick to it. Need to be awake at 8am, need 8 hours of sleep, in bed with lights off and bedtime story done by midnight. There is nothing like actually getting 8 hours of sleep every night for making the alarm less dreadful.

As for the getting to sleep on time part, make sure you get enough exercise during the day-- it is amazing what even 10 minutes of jumping around will do for you. Actually finish the dishes or whatever needs doing so worrying doesn't keep you awake. Remember that caffeine takes a little more than 12 hours to kick in fully, so the soda with lunch can keep you awake at night.

Sure you could be having a serious problem like the other comment suggested, but none of the things I mentioned would hurt that.
gizmoek From: gizmoek Date: November 26th, 2003 09:10 pm (UTC) (Direct Link)
Really the best thing is to set a schedule and stick to it. Need to be awake at 8am, need 8 hours of sleep, in bed with lights off and bedtime story done by midnight. There is nothing like actually getting 8 hours of sleep every night for making the alarm less dreadful.

You also need to do this 7 days a week. You don't necessarily have to wake up to an alarm on the weekends, but staying up until 3, 5, 9 am completely screws up what ever sleep schedule you had been going on during the week.

I went my first two and a half years of college without a sleep schedule at all, and I was like a zombie. It's amazing how much more work I can do and how much more attentive I am during the day now that I have a routine. It's hard to get into the routine at first, but after a week or so it starts to get easier.
jezel From: jezel Date: November 26th, 2003 09:40 pm (UTC) (Direct Link)
Gotta tell you guys, I'm with Zone on this. Some folks really are night people, and trying to work against it can cause a host of other problems. Seriously, your boss should get a grip. If you do great work on *your* schedule, he really should be supporting you rather than fixing what ain't broke.

BTW, I do the magic nose machine too. If you need it, it will make a world of difference...
ardaniel From: ardaniel Date: November 26th, 2003 10:24 pm (UTC) (Direct Link)
I'm smelling delayed sleep phase syndrome, m'self. ;) The CPAP would help any apneas, but that won't necessarily fix the night-person issue...

Given no scheduling whatsoever, I'll gladly stay up until 4am and sleep until 2pm. But, unlike Zoner, I've got a partner who sleeps in the same bed and is physically powerful enough to sit me up and make me get dressed if I'm being stubborn at 6am. ;) The conventional DSPS diagnosis and treatment is pretty much what Gizmo (hi, Gizmo!! ;) said-- you have to set a schedule and stick to it seven days a week if you don't want the zombie sensation.

That being said, I still recommend the sleep consult to anyone who has a problem that's interfering with life or employment, because it *is* a worthwhile investment.

I've found that eating something *immediately* after waking up (leave those Pop-Tarts on the bedside table) helps me, too-- simple matter of my blood sugar getting low overnight. The drinking-before-bed thing just makes me restless, though, because my bladder seizes the chance to issue an all-hands alert every 45 minutes all night.
7threality From: 7threality Date: November 27th, 2003 06:39 am (UTC) (Direct Link)


He's been doing this for as long as I've known him. And alarm clocks across the room don't help, as he will stand up walk over and turn them off and then fall back into bed... all without waking up. It's an amazing skill.

Though I'm a bit confused. What did you do in high school? You must have been required to be there by 8 (or something). Maybe the forced sleep schedule thing will help. It does (kinda) help me get up at 5AM everyday, and allowed me to at least live through the time that I was working 3rd shift without exploding.

Then again, I'm a person that is as conscious as I'm going to get as soon as my alarm goes off. Alternately, I'm as awake as I'm gonna get 2 minutes before my alarm goes off on the rare nights that I get my (near) full 8 hours because my subconscious likes to mock me.
zonereyrie From: zonereyrie Date: November 27th, 2003 01:39 pm (UTC) (Direct Link)
I missed more than my share of busses in my school days. ;-) Once I could drive to school on my own in HS it kind of got worse. I was almost failed out of my senior english class not because of my grades, but because my HS had a mandatory attendence rule. And if you missed more than half the class period it counted as a complete absense. I ended up not hitting the limit, but coming close. It was also an issue one year when I'd taken a lot of time off school for a family trip, and then ended up getting pretty sick for a while and missing a lot more. I was getting close and the school administration was grumbling about the rule - my parents got pissed and had their lawyer grumble back about how failing out someone who was taking honor classes and had mostly As and some Bs would look real good in court. The school stopped grumbling. It was one of those rules originally meant to go after the deliquents.

Anyway, I also fell asleep in school a lot. I would get in trouble for that. First period I was usually still awake, and probably on the adrenalin rush of having gotten ready in a panic. Second period I started to get drowsy, and by third period I'd often nod off. This was not helped by my prescription allergy medications during allergy season. Back then my allergies were much worse so I had strong pills, and still got shots. It *really* pissed off one of my math teachers that I was maintaining an A average in his class and often sleeping through it. He went ballistic on me more than once because he felt it was a show of disrespect. Hell no, it was a show of being unable to remain awake. :-)

I've noticed that as I get older it gets harder for me to maintain a morning schedule. For one I need more sleep - in college one solution for me was just not to go to sleep if I needed to be up early. That doesn't work so well now, I really feel it when I don't get enough. I can do with less sleep for a while, but eventually it catches up to me. I also notice that over time I favor later hours more than ever.
From: iwascaite Date: November 27th, 2003 02:01 pm (UTC) (Direct Link)

Re: Heh

High school was a nightmare. I had to be there by 7 am. I was younger then and could withstand less sleep and making it up on weekends. I did not ever do anything besides schoolwork either, so I was actually resting for 5-6 hours every night. I did not sleep much of that, it used to take me hours to get to sleep.

When I did the same thing my last year of college, I was flattened for months afterward. Refusing to do that again made trouble for me in grad school.

It takes a while to accept that the world is designed for morning people, that everything is still run as if we were all on a farm somewhere. Finding a decent paying job that allows you to come in at 10am is an almost impossible task. And the people you work for always act like they are benevolent because of allowing such deviant behavior.

I get up early now because it enables me to avoid the maximum number of people in my daily life while still being functional.