How to store dates in MySQL

You may be asking me, “Miester I know how to store dates in mysql – you just use the date or datetime data type … duh.” I disagree on this format of storing data. For the following reason …

It’s not flexible. If I store my date in there as YYYY-MM-DD then I have to do a whole bunch of parsing to change how it is displayed.

Why not just store it as a timestamp? You can do the same sorting as you can with dates as well as doing comparisons. Plus this method allows you to know seconds no matter what.

How do you start using this new method, you ask? Use the int(11) data type and then insert time() to insert the timestamp.

Are there any limitations? Yes, as you know (or should) the Unix timestamp was born in 1970 – therefore you will want to continue to use the date data type for birthdays or any date field that might contain a date prior to Jan 1st 1970.

That should be it. It works great for news postings, logs, etc. and is much more flexible than the date or datetime data type.

The human hour glass

Most computers have some sort of indicator to show when it’s “thinking”. On Macs I believe it’s a watch, on windows it’s the everpopular and everpresent hour glass. But what about humans? Do we have the equivilent? I say we do.

What would you say is the human indicator? I say it’s the word
“um” – there’s no other explanation for what the heck to word is used for. In fact if you look at the definition and you will see that it means “to fill a pause when hesitating in speaking.”

Our brains – aka our CPU

We knew this was coming

CNN is running a story about one faction already boycotting the Afghan accord in Bonn. I can’t believe this – why can’t these people move forward and be happy their country isn’t ran by a bunch of terrorist and fudamentalists? Is it too much to ask for them to be the bigger men and be humble about the whole thing?

How to be a geek

Many people know I’m a geek. It’s ok, I have come to terms with it. Basically, it’s a compliment in my opinion. Here I outline what it takes to be a geek. Read on.

Make your list and check it twice ….

  1. Adopt a funny little animal as your mascot – preferably a penguin or unimposing devil
  2. Wear glasses
  3. Know one of the following movie/book series by heart: Star Wars, Lord of the Rings, or the Jersey Trilogy
  4. Own lots of gadgets
  5. Create a cron job to recompile the latest CVS version of the kernel and reboot each night
  6. Code using a low level language and complain about having a left over bit in your 8-bit bitmask
  7. Check Slashdot or Kuro5hin at least 10 times a day
  8. Become a optionaire
  9. Frequent IRC or a mailing list – make fun of AOL h4x0rz while doing so
  10. Start at least one flame per week, while trolling your favorite boards
  11. Pipe flagged messages to festival and brag about how you have talking email
  12. Laugh at the kids who become computer majors “to make money.”
  13. Drink lots of beer, code even more
  14. Attend at least one UG, whether its a LUG, MUG, or PUG.
  15. Reminisce about your Altair, Amiga, or IIe
  16. Release something under the GPL

That’s just a short list of what it takes to be a true geek. If you have done more than 90% of the things on this list then I’d consider you l33+ hax0r.

Miester goes wireless

It’s official, after getting some issues with the modem out of the way it’s now up and running great. I get better reception with it than I do my cell phone. Below is some info about my wireless venture …

First let’s go over the hardware. I bought a Palm V off of eBay for 99.99. Yeah it’s a little low on RAM, etc. but it should serve my purposes nicely. Second, I bought the Minstrel V modem. It looks nice and thin in the picture, but in reality it turns your Palm V into the size of an average Palm III (maybe slightly smaller).

The modem has it’s own battery, which kicks ass. And it’s smart enough to know when you aren’t using it so it’ll shut itself off. The best part about going this route is the fact you can view ANY webpage, instead of being limited to Palm.net.

At any rate so far I give it two big thumbs up. For now you can browse your favorite miester.org articles using your mobile device here.

New stuff

I’ve been updating the site here and there. You’ll notice a few new things. The first is the “Read More” ability and the track how many reads a certain story has recieved. Also, I’ve put my custom tags into effect. Finally I imported all of my old news articles from the old version of miester code. The next thing to come is importing the old articles.

Miester goes wireless

I’ve been in the market for a new palm pilot of some sort. I only had a few requirements: 1.) sync with linux, 2.) cheap, 3.) offer the personal apps. As many geeks before I make purchases I go shopping on eBay. What I found was a Palm V for 99.99! So I bought that and then started looking at the accessories. Like many geeks I yearned to go wireless … well good news OmniSky is now selling off there wireless modems for 69.00 after a mail in rebate. So I end up with a serious wireless solution for 170.00 – not bad!