Recent blog posts
This article discusses debugging a function by rewriting the code.
I'm not sure what I did wrong here, but, my first version of this function didn't work. The function returns true if the current time is withing two time spans. This code was written in a rush, without really thinking about how to do it, because it seemed pretty straightforward. The code, however, was a mess (and embarassing).
Private Function itIsTimeToWork() As Boolean ' Get the two start and end times, and determine if we're within ' the intervals.
For some reason or other, I didn't get an email response from the client on this gig*, and the week was hectic, so instead, I just worked on making the UI a little nicer. VB has a lot of controls, including a background threader, some standard dialogs, and a serial port. This is giving me a real "Rip Van Winkle" feeling, having been over in Unixville for a while.
(* It was lost in my huge email pile. My bad. No matters... the program got a nice facelift.)
Spending most of the evening thinking about ways to test OLE timeout code (and figuring out how to do it in .NET). The issue is simple: the server app isn't super-reliable when it handles bad data. So it will probably time out. The goal is to catch this situation, kill the server, record the error, and continue.
I'm bummed out, because a tutorial about events, delegates, and multithreading that I wrote got lost. There was some database problem on the server, and the text didn't get saved. It just compiled information from the last blog entires, but, it was pretty good. Oh well, I must forge on with this little project.
The latest really good news is that the threading stuff is working. I also added a little time-checking feature so that the batch processor will work for a while in the evening, take a break while backups happen, and then work again in the early morning.
Again, I didn't do much hacking. Yesterday really took it out of me, and I slept a lot (finally). Instead of hard stuff, a few simple things got done.
Copy URL+ is a great extension for [Firefox] that helps you create links to web pages. Instead of copying the URL, it lets you copy the URL-plus-title. Not only that, with a tweak, you can have HTML copied to your clipboard. It's a must-have for any blogger, writer, whatever.
I didn't hack today. Too much stuff going on, so, I did a lot of hanging out and stuff. I did manage to get a little reading done, and found a neat little feature.
A Type List is a way to let your class operate on different data types. For example, if you created a Tree class, a type list could specify that it's a tree of Oranges, or a tree of Integers. Of course, if you just made it a tree of variants, and used variants everywhere, then it wouldn't matter.
My unexpected excursion in to .NET programming has been leading me to learn a lot of little things that are new to me. I'm chronicling them here as an assistance to others doing the same, and to get some personal insight into how I learn these things.
Last night was spent reading a bit more about ADO.NET. There was a very good MSDN article, Best Practices for Using ADO.NET, that gives you an overview of how to use ADO.NET. It's best to read it after getting some experience with ADO from another source.
For the past week or so, I've been learning VB.NET (emphasis on .NET) to do what I thought a perl script and a little VBA was going to knock out. I'll be blogging a little bit on what I learn, as I learn it. To catch up on what's happened so far, see: /node/376 and the parent nodes.
Wrote this back in 2001, to the newdowntown list:
* Don't hesitate to push out the middle income people. If you don't do it
Read Apocalypse No! by Juan Santos.
Rosemead just voted Wal-Mart into the city.
To say the least, I'm crestfallen.
After two years of fights, after seven months of meetings, and a couple months of intense organizing, we lost.
I can't say that I didn't see it coming. The only time that a big developer is opposed is with the support of the City Council, and it appears, from the start, that most of the City Council was siding with Wal-Mart.
Reports from people visiting the city offices seemed to indicate that there was a gag-rule about the project. They wanted to keep the project as secret as possible so that people wouldn't get up-in-arms about it.
The big disappointment, for me, was Margaret Clark. She said she was supporting it, but then whipped out her past positions opposing NAFTA/GATT and her seat on a clean air committee. If there's any company out there that exemplifies NAFTA and GATT, it's Wal-Mart. Just look at their China office.
The nice surprise was Bob Alarcon, who did address some of the concerns in his questions. That was something. Gary Taylor, who had managerial ties to Wal-Mart through his family, was especially defensive.
I was a little bummed out about the amount of rancor in the room. People's helplessness and disgust with the system were palpable, and it came out with angry statements. I sat on the right side of the room, where the pro- side sat, for a while a while, and the smugness there was also palpable.
I was reading up on calendar data structures and came across something I hadn't thought about in years: the 2038 problem.
This is more serious than the year 2000 problem that was supposed to lead to the collapse of technological society. Out in my neck of the relatively modern woods, all that Y2K meant was that a few applications started displaying 19100 instead of 2000, and a few others showed the wrong time or date. They were fixed with minimal incident.
Y2038 is more serious. It's a problem a lot of Unix applications will suffer if they're still running in 34 years. Now, that might sound far-fetched, but, consider this: many important parts of Linux were written in the early 1990s, and haven't yet been updated. Many of these programs were originally written in the early 80s, and the origins of Unix as we know it go back to 1970.
We're already past the halfway mark: Unix is 34 years old, and there are only 34 years left until 2038. So, let's be conscious of this issue, and start dealing with it now, before it's too late.
The Year 2038 Problem
It's better and more confusing than the soap opera. It's my adventures at General Hospital LAC+USC. Let's get caught up on the story.
Rosa's spleen is enlarged, and she's caught up in "the system". Her boyfriend, John, is tagging along, marvelling at the Byzantine system that is LAC+USC. They both worry that the condition can be polycythemia, a rare condition where the marrow produces red blood cells nonstop, and if left untreated, will lead to thrombosis, and death. It could also be a bruised spleen from a fall.
This morning, I got a call from Rosa requesting a ride to the hospital. She'd talked to a nurse there to get her blood test results. Simple enough, I thought. I get that kind of info over the phone sometimes. But, no, she had to go in person.
When I drove her there, it took a few minutes for Rosa to be told that, no, the results would not be given out. The doctor needed to talk with her. So an appointment was scheduled. Also, they would not schedule her to CT scan her spleen, despite the fact that the doctor requested it last time.
That seemed stupid. The scan was requested at the prior appointment. They should just send the request, so it can be performed before the doctor appointment. That would knock out two birds with one stone.