Archive for the ‘Dev’ Category

php|architect

Tuesday, January 3rd, 2006

php|a is a magazine directed towards PHP developers. It’s the most successful magazine that focuses purely on PHP. They release an issue every month and they’re on their 4th year so far, with no signs of slowing.

I just ordered the last 4 issues (they offer both a digital [pdf] and printed version), and I really like it :-) If you are a PHP developer then I think this magazine will interest you greatly. While it doesn’t really hold content you couldn’t find online somewhere, it’s composed and written for you. That means every month, you get a range of topics that you might not have thought about before! December’s issue held an interesting article on Drupal — which actually prompted me to try the magazine in the first place.

(And before anyone comments: Yes, I’ve said I don’t like PHP in the past. But that doesn’t mean I’m going to give it up ;-) I still develop with it on a daily basis.)

Remembered Collapsible Objects with PHP and Javascript

Friday, August 26th, 2005

This is kind of a part two to my quite popular (well, popular according to the search engines) post Collapsible Tables with Javascript.

This time I went through and extended the features a little. With this script, your users won’t have to keep clicking to collapse/uncollapse objects on your pages. Through Javascript setting cookies, and PHP picking up on the cookies, your page will “remember” the state each object should be in. Thus, the things the user has chosen to collapse will stay collapsed and the things they chose to uncollapse will stay uncollapsed.

I also wanted to bring attention to newer users: almost anything can be collapsed. My last post used “table” in the title and many new users seem to think only table rows / tbody’s can be collapsed. But, of course, that is not the case. Collapsing is simply hiding, so anything that can be hidden can effectively be collapsed. This means: tables, lists, buttons, forms, divs, fieldsets etc. (more…)

EventManager

Sunday, May 29th, 2005

Yesterday I was talking about how my attempts at creating a event manager had failed.

Since the differences and problems associated with W3C DOM2 Event spec and the Microsoft events model, I decided to create an event manager based on the the old, traditional model of obj.event = func. And it works pretty good! I’m really quite proud of it :) Take a look at it HERE.

Basically it just makes adding and removing listeners easy. If there is more then one listener on an event, it creates a closure so they can still all work together. All the listeners are added to a ‘registry’ so removing them is really easy, it just have to regenerate the closure without a particular listener.
[code lang="javascript"]Events.add(buttonElm, ‘click’, sayHello);
Events.add(buttonElm, ‘click’, sayGoodbye);
Events.remove(buttonElm, ‘click’, sayHello);[/code]

Just some more testing to do :-)

IE is Annoying!

Saturday, May 28th, 2005

I just spent the last little bit creating a Javascript EventManager to take care of event listeners cross browser. Using the traditional method of attaching listeners to events is just “okay”. There are a couple of big problems, the biggest being you cannot easily add more then one listener to a single event.
(more…)

jEdit

Sunday, May 22nd, 2005

jEdit ScreenshotI downloaded jEdit today, and after some configuration and some plugin installs — it’s now my favourite editor for coding sessions (sessions apposed to quickie stuff, where I still use EditPlus). Though I think it’s mainly used as a Java editor (as you could probably gather from the name), it supports countless other languages, including PHP.

I have two favourite features. One being the code folding, where you can collapse chunks of code. The other being the Whitespace plugin that, amongst other things, “lines up” indentation levels. For example, between the { } of a while loop, you can see a grey line that lets you clearly distinguish where the loop starts and finishes, and lets you see at a glance what code belongs to the loop.

Anyway, I thought I’d share my new favorite editor :)

Using Subversion

Monday, May 2nd, 2005

I spent the weekend looking into version control systems (specifically CVS and Subversion). After fooling around with CVS for a while, I went to SVN to check it out.

Overall, I like SVN better. I find it a little easier to work with. I’m not sure if I like how each commit creates a new project-wide revision; with CVS, each file had it’s own revision number.

Anyway, just wanted to give a shout out to the devs that aren’t using a version control system, to, er… start using one lol. It’s really quite helpful. It’ll let you look at the differences between versions of files, keep a history of all files etc. Even more useful if you’re in a multi-developer project (in which case, I don’t know how you were managing without one).

My new host let me set up a SVN rep, and I use a SSH tunnel with TortoiseSVN to manage my working directory on localhost. Very cool stuff ;)

Another Plugin

Sunday, April 17th, 2005

Screenshot I’m working on another plugin for WordPress. It’s one of those “I’m listing to” type things. It gets the current song from Winamp, then sends an update to your server. You have to download a small app that runs in your taskbar for it to work. I don’t care if anyone wants to use it, but I’m practicing my C#.NET and decided I wanted to try working with the Windows API. As a result, here we are ;-)

Pretty useless considering there’s a Winamp plugin that sends requests to any URL you want :-P

Draggable Layers

Wednesday, March 30th, 2005

I was fooling around with some more Javascript for the last 2 hours or so and finally came up with some pretty cool code :D

I was inspired by Matt Mecham’s entry which showed off a new draggable box that dynamically generates a private message summary when you click on a link. So I saw it and thought, hey, that’s cool :) And two hours later, I’ve got myself a draggable layer :D

I’ll show off an example tomorrow.

Slashdot on IE and CSS

Thursday, March 17th, 2005

Linkage

The original article is on IE7 and how it’s probably not going to adopt the CSS2 standard, again. But the comments on that article really speak IMO.

Microsoft is hindering the advancement of technology, all because of what? Because, “Microsoft considers CSS2 to be a flawed standard”? That’s pathetic. Like it or not Microsoft, it is the standard, and not supporting the standard isn’t helping anybody, certainly not you.

Whiteboard

Tuesday, March 1st, 2005

I bought myself a whiteboard the other day so I can organize my thoughts more effectively. It is a wonder! I have it facing me while I’m on my computer, and I can look up at it whenever I want. It makes it easy to add ideas, erase them, jot down notes, todo’s etc.

So to all the software devs that don’t have one: get one! If I ever get an office (instead of my bedroom/office), I think I’ll fill an entire wall with a huge one.

New Interest

Thursday, February 3rd, 2005

I’ve decided I want to learn Java. The thought has crossed my mind before but I’ve put it off because of it’s slowness (because it is compiled, but it still has to be interpreted by the Java Virtual Machine (VM) so it can “write once, run anywhere”).

But Java has been around for a while, and I can’t see it going anywhere. Being cross platform is obviously a huge plus. But that isn’t my main reason. The main reason why I’m deciding to embark on this “mission” is to get my feet wet in some serious OOP. There are other languages that are OOP, like the .NET suite, but I think the skills I can pick up from Java will be those I can use everywhere.

So there’s my plan! This doesn’t mean I’m going to stop everything I’m doing dead, of course. I just think it’s time to start something new.

New Design

Sunday, January 23rd, 2005

Decided to create a new design today, and here it is :) A couple more tweaks to do, but I like it. I’m thinking of added some new sections (buttons up on top).

Anyway, this was the most challenging design I’ve done so far, I think. Take a look at the CSS file ;-) I’m quite proud of it actually!

On the bottom part of the first column over there, you can choose a wider width if you’re like me and can’t stand the small ones ;-) I made that for me!

Anyway, what do you think?

Critical PHP Vulnerbilities

Friday, December 17th, 2004

Hardened-PHP released a list of critical vulnerabilities for PHP on the 15th. Even though the list was released on the 15th (the same day the secure PHP versions were released at PHP.com), the hype has started up since it has been Slashdot‘ed. They affect lots of popular scripts including phpBB (already an exploit), vBulletin, InvisionBoard and more. Since the Slashdot article, I can see a bunch of exploits being released publicly in a short amount of time (for example, the phpBB exploit that was posted today).

Any PHP version <4.3.10 is vulnerable, so go download the newest now!

Shiftblog

Monday, December 13th, 2004

I’ve been low on time since the beginning of this school year, so I decided to take on a side project that would be simpler — a blog :-) I do a little bit at a time, but it’s coming along nicely.

Just thought I’d post something since not much has been going on.

BlogTorrent

Thursday, November 25th, 2004

BlogTorrent beta was released today.

Sweet.

Site Widths

Sunday, November 7th, 2004

I’ve noticed that more and more sites are beginning to toss aside that no-horizontal scrolling rule for lower resolutions. Like CNet and AnandTech. Seems like widths of 1000 are becoming normal.

Browser Wars

Saturday, November 6th, 2004

With Firefox approaching 10% of the browser market, the browser war debates are reaching an all time high — especially on the tech sites and forums I visit.

IE still holds about 90% (possibly above, depending on what sources you look to), but FF is the first browser to threaten IE’s dominance.

I realize arguing about what browser is more 1337 then the other is plain stupid, I still like to know why anyone would use IE. Page rendering? No… Standards support? Definitely not… Features? Not that either… Then why? Are people just too lazy to switch? With all of the serious IE holes, and the time it takes to patch them, I would at least switch because of that. I mean, FF has its own share of bugs (which is acceptable, considering it’s still not gold yet), but the most serious of them are fixed fairly quickly.

So if you are an IE user — tell me, why oh why do you still use it? There are countless articles reviewing browsers, and there have been countless times where people have recommended to ditch IE (ditch IE plain and simple, to switch to any other browser — not only FF).

With the tech-savvy population, the stats indicate a percentage of over 20% of people use a non-IE browser. I wonder if the trend will catch on, especially with the rumors about a Google browser based off of Firefox.

Form Validation with PHP and Javascript: No Refreshes

Saturday, October 2nd, 2004

This is a repost of one I did a while ago and deleted, but I like it so I’m going to post it again!

I was fooling around with CSS and Javascript and eventually started to mix the two into PHP. Using two frames, one spanned 100% of the page (thus, it’s like there is no frame) and the other one just there to load new bits of Javascript. The form posts data to the other frame, which is a PHP script, and PHP works out Javascript depending on the information it received. Within the HTML form (the main frame), we have hidden div’s that contain error messages, when PHP find something that doesn’t validate, we output Javascript to un-hide those div’s and thus display the error messages. Look at the bottom of this post for a working example. (more…)

Bit Permissions

Wednesday, September 29th, 2004

Permission TipThere are a lot of instances where a program or script will need to work with multiple users. Most of the time, users will need to have certain permissions (for example, a normal user and an administrator).

Lot’s of developers feel the need to make a huge database table with all these “can_*” fields as the permissions. But there’s an easier (and cleaner) way of doing this. All it takes is one integer field in your table. (more…)

PureBoard

Tuesday, September 7th, 2004

PureBoardMe and Dave have finally decided on a project and are following through on it ;) That project is PureBoard. Yes, I know, “yet another bulletin board?!”. Yes! The reason being, I’ve always wanted to create one and my work with forums in general, I think I have a good idea on what the end user wants. We’ve got some seriously cool new features planned, so hopefully that’ll set us apart from the competition.

Most of all though, I think we just need an experience, a product to add to a base so when we start our company seriously, we’ll have some things to show off. If pB actually does take off, then so much the better.