Ok, everyone who's been in IT for more than 7 years should remember the mass scramble to patch all of your systems by Jan 1, 2000. Dates stored with two-digit years prior to 2000 had a rollover effect as the years went from '99' to '00', possibly affecting math operations. History tells us that this created a few small problems in 2000, but for the most part, IT folks got ready for it and did a bang-up job making sure code was compliant and in working order by the millenium.
Only one problem - not all date/time is stored in plaintext in our systems. Nope, in fact, one heavily used storage mechanism for storing dates and times is storing the information in a rather larger unsigned integer that counts the number of seconds since January 1, 1970. Anyone who programs for Unix/Linux or other variants should instantly recognize this marker. Well, the timer is ticking, folks. That integer won't last forever. We're going to have some rollover in 2038 (early AM on January 19th). And that's only 21 years away.
Sure, you may not be a programmer 21 years from now, but you have a duty to save yourself from this coming catastrophe for your code. And if you're reading this, consider yourself warned.
If you're coding for a 64-bit system, perhaps the solution will be to write some helper methods that use a 64-bit counter that can be recoded once libraries are available for the date methods. This will save the maintenance time of looking through all of your code for the smaller integers later. Of course, using proper typing for your code is important too; using int when you meant to use time_t for example.
If you code, or support code that uses time functions based on the January date, take a look at your code now to ensure that it is ready to switch over to new methods or new sizes. 21 years may sound like a lot now, but the years will tick off sooner than you think.
Randomblings from Rich - Random talk about technology, science, chess, news, hobbies, stupidity and myself.
July 30, 2007
June 30, 2007
Natural Rights - Who? What?
What is a 'natural right'? It's interesting that we, as Americans, have lost the self-image of ourselves as a free people, and instead think of ourselves as a free nation. The difference is that we see ourselves as part of a greater being, a group rather than individuals. The danger in this thinking is that we do not pay attention to the fact that what we should be protecting is our individual, God(?)-given rights, rather than our concept of proper politics or form of government.
When you look at the Declaration of Independence, which separated this great country of ours from the Oppression of the King of England, and I quote:
Notice where the rights come from...not from any form of governing body, not from the rule of the iron fist, but from our Creator. These are natural rights. As human beings, we have the natural right to live life as we see fit. A government can not take these rights away from us. A government should only help us protect each other from the exercise of these rights by others when it will interfere with our own rights.
Government derives its power from the governed, to secure the rights of the individual. Government is a tool meant to protect our natural rights. Look to your candidate for the upcoming elections. Ask yourself whether this basic premise is the premise for the platform upon which they stand. If it is, vote for them. If not, find yourself another candidate. It's your natural right to be governed by someone who has YOUR best interest(s) at heart. And if you can't find yourself another candidate, may I suggest looking at Ron Paul, the only candidate I've heard mention our natural rights as the basis of his beliefs.
When you look at the Declaration of Independence, which separated this great country of ours from the Oppression of the King of England, and I quote:
We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness.
Notice where the rights come from...not from any form of governing body, not from the rule of the iron fist, but from our Creator. These are natural rights. As human beings, we have the natural right to live life as we see fit. A government can not take these rights away from us. A government should only help us protect each other from the exercise of these rights by others when it will interfere with our own rights.
That to secure these rights, Governments are instituted among Men, deriving their just powers from the consent of the governed
Government derives its power from the governed, to secure the rights of the individual. Government is a tool meant to protect our natural rights. Look to your candidate for the upcoming elections. Ask yourself whether this basic premise is the premise for the platform upon which they stand. If it is, vote for them. If not, find yourself another candidate. It's your natural right to be governed by someone who has YOUR best interest(s) at heart. And if you can't find yourself another candidate, may I suggest looking at Ron Paul, the only candidate I've heard mention our natural rights as the basis of his beliefs.
June 14, 2007
An Honest Conservative Politician is Running for President.
Why am I backing an underdog in the 2008 election? Ron Paul spoke with Tucker Carlson today on MSNBC. Tucker asked him about some of his decentralized economic policy, asking him outright if he sounded callous or mean. Dr. Paul's response was fantastic. He spoke about how Federal programs aren't working out, how FEMA seems to make more of a mess than local efforts would have provided.
The more I think about what he said, the more it makes sense to me. He used the term 'bread crumbs promised' by the federal government. Is it good to depend upon the freebies that the government provides us rather than depending on ourselves and our localities to provide? When you give someone a helping hand, isn't the common problem that the person you've helped will only look to you for a handout each and every time they get into trouble and end up depending on you instead of themselves? For the freebies, don't we also have to give up something in return, part of our freedom? Is that loss worth the price?
And what is the cost of a government handout? If the government gives you $1, but it costs the country $10, then what is the benefit to the country in the end? Aren't we just subsidizing a huge inefficient bureaucracy whose primary purpose is to shuffle an ever-devaluing dollar?
These are all just thinking points for me right now, and I welcome debate, but this man makes a lot of sense to me when I hear him speak. Hopefully his campaign takes off. Perhaps the Republicans will realize that to win in 2008 they will have to offer up a candidate that is very different from the current regime. Swing voters, fence-sitters and true conservatives aren't going to vote for Rudy - he's just more of what we already have.
The more I think about what he said, the more it makes sense to me. He used the term 'bread crumbs promised' by the federal government. Is it good to depend upon the freebies that the government provides us rather than depending on ourselves and our localities to provide? When you give someone a helping hand, isn't the common problem that the person you've helped will only look to you for a handout each and every time they get into trouble and end up depending on you instead of themselves? For the freebies, don't we also have to give up something in return, part of our freedom? Is that loss worth the price?
And what is the cost of a government handout? If the government gives you $1, but it costs the country $10, then what is the benefit to the country in the end? Aren't we just subsidizing a huge inefficient bureaucracy whose primary purpose is to shuffle an ever-devaluing dollar?
These are all just thinking points for me right now, and I welcome debate, but this man makes a lot of sense to me when I hear him speak. Hopefully his campaign takes off. Perhaps the Republicans will realize that to win in 2008 they will have to offer up a candidate that is very different from the current regime. Swing voters, fence-sitters and true conservatives aren't going to vote for Rudy - he's just more of what we already have.
June 04, 2007
Body Count Counts
When you're making a mafia play, series, movie, whatever, what counts is the body count. The best episodes of the Sopranos are those in which somebody gets whacked. Last night, four and a half people got whacked (one is in critical condition). It was the best episode of The Sopranos since Big Pussy got shot up by Tony and his crew. The higher the profile of the whackee, the better. Of all the things I'll remember about the Sopranos, every single memory will involve someone getting killed or getting his/her ass kicked. After all, what's a mafia movie without someone getting the smackdown?
David Chase and his ilk should take note that the most talked about episodes always involve the greatest violence. When Tony gets to dreaming about horses in the living room, no one goes to work the next day and interrupts their coworkers with 'Hey, did you see that horse in the living room? That was funny, eh?'. But you can hardly contain yourself from gathering around the water cooler with 'Did you see them blast that Ukranian dude last night? What a bunch of jerk-offs, eh?'
You see, human tragedy is both mind-scarring and funny. That's what a successful mafia movie is all about....tragedy. And last night, The Sopranos delivered.
David Chase and his ilk should take note that the most talked about episodes always involve the greatest violence. When Tony gets to dreaming about horses in the living room, no one goes to work the next day and interrupts their coworkers with 'Hey, did you see that horse in the living room? That was funny, eh?'. But you can hardly contain yourself from gathering around the water cooler with 'Did you see them blast that Ukranian dude last night? What a bunch of jerk-offs, eh?'
You see, human tragedy is both mind-scarring and funny. That's what a successful mafia movie is all about....tragedy. And last night, The Sopranos delivered.
May 21, 2007
Buzz, buzz - busy bee
This weekend was interesting - saw Shrek the Third on Friday, threw a bbq on Saturday and ended up with a new 3G phone on Sunday. We added another line to our service contract, and the Cingular store wouldn't do it without a contract. Rather than wait or shop another store, I picked up a freebie phone while I was there. I'm on Cingular/AT&T and it has the Cingular TV service, along with unlimited Internet browsing for $19.99/mo. I was paying $14.95/mo for my old 5MB data plan, and I use the Internet on my phone a lot to read news and email.
This new phone has a 2MP camera on it, takes my old microSD memory card from my SLVR, plays the music (without the stupid 100 song limit or the iTunes database requirement) I have, has a nice Java Email client that alerts me for Hotmail or Yahoo email, takes video, and has stereo bluetooth (for the music baby!). I haven't bought a stero bluetooth headset, but eventually I may.
The barbecue was a lot of fun. I cooked ribs, kielbasa and Nathan's skinless franks. A friend brought potato salad and another brough vindalu(sp? - help me out here Matt). Of course, I ran out of propane as soon as I dropped the ribs onto the warmed grill and had to make a mad run to the store, but everything else worked out fine. There was adequate beer and drinks to go around, and plenty of chatter. The deck held and didn't fall, and nobody jumped to their doom; all signs of a good bbq.
As for Shrek the Third, it was funny enough, although the novelty of the characters has kind of worn off for me. While I'm glad we went to see it, it wasn't necessarily a must-see on the big screen.
This new phone has a 2MP camera on it, takes my old microSD memory card from my SLVR, plays the music (without the stupid 100 song limit or the iTunes database requirement) I have, has a nice Java Email client that alerts me for Hotmail or Yahoo email, takes video, and has stereo bluetooth (for the music baby!). I haven't bought a stero bluetooth headset, but eventually I may.
The barbecue was a lot of fun. I cooked ribs, kielbasa and Nathan's skinless franks. A friend brought potato salad and another brough vindalu(sp? - help me out here Matt). Of course, I ran out of propane as soon as I dropped the ribs onto the warmed grill and had to make a mad run to the store, but everything else worked out fine. There was adequate beer and drinks to go around, and plenty of chatter. The deck held and didn't fall, and nobody jumped to their doom; all signs of a good bbq.
As for Shrek the Third, it was funny enough, although the novelty of the characters has kind of worn off for me. While I'm glad we went to see it, it wasn't necessarily a must-see on the big screen.
May 12, 2007
Democrats - Listen Up!
It's quite possible that Frank Luntz had a very valid point on Bill Maher last night. The democratic party politicians have been spewing a lot of rage and hatred against what's going on in the White House and the last Congress. Perhaps they should stop for a minute and change their tone to what they plan to do to make America right. It is no longer necessary to tell us what liars and idiots are in the White House. The American public already knows, just look at the approval ratings and the overwhelming victory for democrats in 2006.
Here we are in 2007, and they're trying their hardest to come up with accountability for the military activity, and plot the eventual withdrawal from Iraq. But this concentrates on only half of the problem. Once we have our military back home, what are we going to do about the problems that the Republicans were trying to solve? I'm not saying the Republicans are necessarily right in how they're trying to solve problems. I'm not saying what the Democrats are doing at the moment is wrong. Seriously, though - I would like to know the next step in helping us stop terrorism. What foreign policy can we make that will work for us? We can't be complete isolationists, no matter how much I'd love to be (as a Libertarian). While I'd love to stay out of the business of the rest of the world, there's still an awful lot of America-hatred out there, and I'm interested in hearing from reasonable candidates as to what we can do right now to fix our image.
Leadership is telling people what you're going to do, not what the other guy is doing wrong. People are able to make up their own minds about the current administration. In fact, all people ever do is try to criticize the current regime. It's what peasants do best. If the Democrats really want to lead this country, they need to change their message to one of 'This is what we'll do', instead of 'This is what they're doing wrong'. With the current approval ratings, the time for this leadership message is NOW.
Here we are in 2007, and they're trying their hardest to come up with accountability for the military activity, and plot the eventual withdrawal from Iraq. But this concentrates on only half of the problem. Once we have our military back home, what are we going to do about the problems that the Republicans were trying to solve? I'm not saying the Republicans are necessarily right in how they're trying to solve problems. I'm not saying what the Democrats are doing at the moment is wrong. Seriously, though - I would like to know the next step in helping us stop terrorism. What foreign policy can we make that will work for us? We can't be complete isolationists, no matter how much I'd love to be (as a Libertarian). While I'd love to stay out of the business of the rest of the world, there's still an awful lot of America-hatred out there, and I'm interested in hearing from reasonable candidates as to what we can do right now to fix our image.
Leadership is telling people what you're going to do, not what the other guy is doing wrong. People are able to make up their own minds about the current administration. In fact, all people ever do is try to criticize the current regime. It's what peasants do best. If the Democrats really want to lead this country, they need to change their message to one of 'This is what we'll do', instead of 'This is what they're doing wrong'. With the current approval ratings, the time for this leadership message is NOW.
May 11, 2007
Swimming Progress
700 meters - 30 minutes. That's where I'm at as of today - 700 meters in a half hour - 14 full laps at 50 meters a lap. I've been swimming 4 or 5 days a week for about a month now, in an attempt to improve my health. I've been a pretty bad couch potato over the past few years, so I buckled down and joined the local gym/pool. So now I go to the pool and exercise. Today was one of those days when I didn't want to go, but I managed to pull myself into going anyway, and I'm thankful I did. It feels good after a good workout. I swim breaststroke, crawl, backstroke and sidestroke, at least 2 full laps of each, and I take a short breathing break every lap or half-lap depending on how I feel. I'm actually surprised that I am up to swimming a third of a mile (33 full laps is a full mile).
What is even more amazing is that I used to be deathly afraid of the water. When I was about 8 years old I slipped in a pool, and some friends who thought I was kidding around pushed me under again. After coming close enough to drowning for my tastes, I avoided pools like the plague. Thanks to my step-mother at the time, I was enrolled in a YMCA swimming class when I was 13 or 14. After being embarrassed into learning to swim (I was in a class with a bunch of toddlers, for crying out loud), I learned not to fear the water. I'm still a little afraid of the water, but I've at least learned to control my fear of drowning enough to dive for coins in the 12 foot pool at the local diving board, and enjoy swimming in the ocean.
What is even more amazing is that I used to be deathly afraid of the water. When I was about 8 years old I slipped in a pool, and some friends who thought I was kidding around pushed me under again. After coming close enough to drowning for my tastes, I avoided pools like the plague. Thanks to my step-mother at the time, I was enrolled in a YMCA swimming class when I was 13 or 14. After being embarrassed into learning to swim (I was in a class with a bunch of toddlers, for crying out loud), I learned not to fear the water. I'm still a little afraid of the water, but I've at least learned to control my fear of drowning enough to dive for coins in the 12 foot pool at the local diving board, and enjoy swimming in the ocean.
May 09, 2007
Yes - I like the f/1.8 lens
Ok, my last post from the circus this year. I really like what this new lens did for my ability to shoot this event. On this particular shot, which is cropped about 50% from the original, I was able to shoot at f/1.8 at ISO 800 to minimize grain, and still get a fairly stable shot. Those of you who know me already might suspect me of Parkinson's, making this shot that much cooler. While the white tiger is still a little washed out from the spotlights, I was already underexposing this as much as my poor little Rebel would let me (2 full stops). Sometimes I want to rush out and buy a higher-end camera, but then I realize that I'm just some poor dumb Software Architect, not a professional photographer, and my wife would kill me before I could open the box if I spent $4K on a camera. I still lust after the f/1.4 and f/1.2 lenses - but they cost ohhhhh so much. My poor zoom lenses don't go under f/3.5, so there's no way I was going to get a better shot from this distance.
I love this trick

I Love the Circus

Testing a post from Picassa to a blog. This is a picture of the elephants from the Ringling Bros. circus we went to a few weeks ago. I love going to the Circus for the clowns and the animals. We had a great time, and the bonus is that it's a good learning experience for my camera skills. I have a Canon Rebel (old style) and recently bought an f/1.8 50mm lens for it that I took with me on this trip. With the spotlights on the action, you have to underexpose from the metered settings due to the darkened theater. I was pretty happy with this shot of the elephants, but shots of white horses and the white tigers were still blown out even with the 2 stop underexposure. Click on the image for a larger version. The post worked direct from Picassa, which may mean that I post more images to the blog in the future.
Subscribe to:
Posts (Atom)