I can’t figure out what to title this
2010-01-19 12:29 pm ∴ Programming, Thoughts ∴ by matt -

This is my first update in quite a while. I’m not dead. I had a few posts in draft mode, but I never finished them. The topics were:

  • A web crawler script I wrote and some design issues I was having with it.
    - I actually figured out some of the problems with it and made it much more efficient. So there really wasn’t any point in finishing the post. It was more of a thinking out loud kind of deal.
  • Why they should let MySQL die and why Monty Widenius should bite me.
    - This was going to be my response to Monty’s Plea to people to save MySQL from Oracle (I don’t feel like finding the link, just google it). The gist was that he probably shouldn’t have sold out to Sun, would be better concentrating on MariaDB — a supposed MySQL successor, and that generally MySQL sucks and there are better alternatives anyway. I also held him responsible for the countless headaches I endure while being forced to use MySQL, and thus decided he could bite me. :)
  • How awful the jQuery plugin site is and some thoughts on how to replace it.
    - I started writing this post because I have such a hard time keeping my plugins up-to-date due to the fact that the plugin directory is terrible. I started writing the post and just went through the site listing the problems I saw. The list became so massive that it clearly was something that I couldn’t handle on my own, so the post turned in to a call to action with the suggestion of using Google App Engine to run the site. But, the number of problems is depressing and thinking about spearheading a project of such magnitude in my free time was not at all appealing.

So, the holidays came and went. The new year as well. I’ve been extraordinarily busy at work and at home, extraordinarily lazy and tired.

But I do have one small announcement. Off and on over the past year, I’ve been toying with ActionScript and Flash and Flex because a long, long time ago, I thought  I would pursue Flash as a game platform.

After some consideration, I will absolutely *NOT* be doing that.  While ActionScript, as a language, isn’t terrible, I don’t particularly like it. It’s similar to Javascript, but with more crap that you have to do. The real problem I have is with Flash as a platform. In short, it’s probably one of the worst I’ve ever seen. It’s slow, bloated, and full of known security holes. I could make a whole blog dedicated to how much I hate Flash and problems with it.

The only positive thing I can say about Flash is that it’s everywhere. Though, with all of the security problems, it may not turn out to be a good thing.

Instead — I’m trying to stay positive — I plan on focusing on some of the emerging Web App technologies as a platform. I have a feeling in 6 months, I’ll be back here griping about how ridiculous canvas, WebGl, etc. are.

I may try to write a simple game to test, or redo a certain game with flying corpses. So, until then.

Am I nuts?
2009-10-26 4:21 pm ∴ Programming, Rant, Thoughts ∴ Tags: , , ∴ by matt -

I’m starting to think I’m a masochist. Examine the evidence:

  • I’ve been in 2 serious relationships with crazy (and I do mean crazy) girls — both ended crappily.
  • I still hand wind my guitar strings.
  • I’ve worked with PHP since version 3 and I’ve had a job doing it for 5 years. I actually gave up a job doing embedded systems with C to keep doing PHP work.
  • I keep thinking I want to learn Erlang.
  • Lastly, and I think this is the big one, despite the fact that I’ve worked on no less than 3 failed IRC clients — I started working on an IRC bot project.

(more…)

More fun with PHP ORM libraries
2009-10-14 11:09 am ∴ Programming, Thoughts ∴ by matt -

A few months ago, I was contacted by the developer of Red Bean — a new PHP ORM library. He seems to share my dismay with the overall suckiness of every ORM library and he asked if I would give his project a looksee.

Before that, I have a few thoughts on Kohana and it’s ORM library.

(more…)

So easy, a caveman can use it.
2009-08-19 10:17 pm ∴ Programming ∴ Tags: , , ∴ by matt -

Someone pointed out to me today that if you look at the source of the front page on www.geico.com, you might see that they use a certain timer script for rotating banners…

In fact, it’s this one: http://www.geico.com/public/scripts/jquery/jquery.timer.js

Yeah! That’s me! And all this time I thought the script was pretty useless, but I guess a certain Gecko found a good place for it.

Honestly, I may have used that script once or twice, but that’s it. I don’t use timers a lot. But, if there’s enough interest, I’m open to adding bug fixes and features and such. I’ll also accept patches, etc.

Thanks to Alex for pointing that out. Pretty neet! ;)

PHP date stuff
2009-08-04 12:38 am ∴ Programming ∴ by matt -

I’ve talked before about how I thought PHP’s date handling is the best thing about PHP.

Well, I kinda lied. It sucks…

It works fine if you’re dealing with dates in the here and now, but say you’re accepting user input for a date-of-birth field. strtotime() returns a signed integer, and if you look carefully, you’ll see that strtotime() will fail on early PHP5 revisions on Windows for dates before 1/1/1970.

So that’s problem 1. Problem 2 is going past 1/19/2038.  You would think that it wouldn’t be a problem on 64-bit systems, but I have no idea if that’s the case or not — I can’t seem to find any documentation on 64-bit versions of PHP using 64-bit timestamps.

Luckily, there’s a new DateTime class for PHP 5.2 and up. The constructor of the DateTime class accepts anything that strtotime() can, and DateTime::format() accepts a date() style format. So that’s easy enough. Hopefully, you deduce by my lack of griping, that Pre-epoch and post-2038 dates will work. I didn’t test to see how far back or forward, it can go. Far enough for my uses.

Why the new class isn’t listed on the date() and strtotime() pages — I have no idea. Hopefully now I won’t have another Epoch Fail.

Something else too
2009-07-14 11:01 am ∴ Programming ∴ by matt -

Added something else to the programming section. I want to write more about it, but I don’t really feel like it right now. So check it out. If you have ever done categorization with a DB, this should be of interest.

New Example
2009-07-13 1:32 pm ∴ Programming ∴ by matt -

Added a new example to the Programming page. It’s a short, short file that is a pretty decent example of Python Metaclass usage.

So this happened
2009-07-02 10:44 am ∴ Programming, Rant ∴ by matt -

I was, at one point, a big fan of the Visual Studio Environment. Yesterday, my appreciation of it was crushed — perhaps permanently.

See, every once in a while, I’ll get the urge to program something. Yesterday, I went to start up a new WPF project in C# Express. I wanted to code myself a little forecast/weather grabber from the NOAA NDFD Forecast Soap Service which I had experimented with before. So I added the service to the project and had Visual C# generate the code, as has been the way for a long time.

Lo’ and behold: it didn’t work.

Turns out that the service didn’t specify an encoding or didn’t encode properly. C#  wants everything to be UTF-8 or UTF-16, and dies thusly. It wasn’t dying or throwing a warning about the encoding while generating the code, or even instantiating the service, but only when data was recieved after the method call. Turns out, the way to handle encodings other than UTF-* is so unbelivably complicated that I don’t care to do it, especially when specifying the encoding could easily be an option when generating the code.

So while I’m debugging this project and trying to get it to work, a “Help Update” dialog pops up and prevents me from doing anything. I try to stop the debugger at least, so this update can complete and VS tells me that it’s waiting for the update to complete. Ok… so I wait. And wait…wait and wait and wait… nothing. According to Task Manager, this update is burning up 100% of my cpu, so I get mad and terminate the process. It takes me two or three times of terminating the process before I can actually get it to die and get control of VS back. As I stop the debugger and prepare to close the IDE, the update dialog comes back, continues to burn up my cpu and my patience.

“Something must be messed up,” I think. So I repair the MSDN install. It comes back. I repair C# Express. It comes back. I uninstall MSDN, effectively removing what needed the update (or so I thought), and it COMES BACK! I uninstall C# Express and the problem goes away :)

So I’m done with Visual C# Express for a while and my high opinion of the MS development tools is shattered. It’s a shame too — I had high hopes for XNA.

Oh yeah, my computer at home is kind of shot and I can’t afford to get a new one. So this site will probably go unmaintained for a bit.

Maybe I’m doing it wrong?
2009-03-06 10:07 am ∴ Programming, Thoughts ∴ Tags: , , , ∴ by matt -

I decided to try my hand at writing an RIA using Ajax again. It didn’t take long before I realized stuff wasn’t working or wasn’t going to work and I changed the architecture.

Then changed it again…
…and again…
…and again…

I must be doing something wrong, right? There’s no way it should be this hard in this day and age to write a really simple Ajax-app. Why can’t I wrap my head around the design phase. I get my plan in motion, then I just realize, “Oh that’s not going to work.”

Yesterday, I downloaded the free Adobe Flex SDK to give it a shot.

I must say, it’s very impressive. I felt like I was doing real programming and not just hacks upon hacks. MXML is a bit like XUL, based on my very limited XUL experience.

XUL was another candidate but, running XUL stuff isn’t as easy. There’s no guarantee that my target user will be using Firefox. Nearly everyone has Flash. The downside to Flex is that it’s probably a good deal slower than XUL would be. But that’s ok too — I’m not going for performance here, it’s more about cutting development time.

More to come later…

VIM makes my life easier
2009-03-05 4:34 pm ∴ Programming, Thoughts ∴ Tags: , , ∴ by matt -

So today, I had to comment out a bunch of links on a static website. It was only linked from 10 or so pages, so I thought writing a regex to comment out just that link would be too bothersome. I decided to just use VIM. Here’s how easy it was:

<Enter>  -- Open the file in WinSCP
:41 -- go to the line number of the tag to comment out
vat -- select all of the tag
<Alt-X> -- Comment out the selection with the EnhancedCommentify plugin
ZZ -- save and close
<Down-Arrow> -- go to the next file in WinSCP

That’s all. If I had more commands to do, I could record a macro and get everything down to around 6 keystrokes. Can’t beat that.

[p → ∞]