I decided to throw togather a page that contained the collection of my capes. Funny thing is that I haven’t taken a picture of me in all of them.
There is a also a picture of me with my star on, which I “earned” at work the other day.
I figured if you were going to make a fool out of yourself online, you better do it properly.
I’m also just started some meaningful categories. I don’t know if I should go back through my posts and fix them up.
-= Comments
1. Andrew B Coathup | August 14th, 2006 at 7:51 pm
If I was recruiting and googled your name (along with Swinburne) it would bring me to Byte Club (well a cached copy of the forum) and eventually pictures of your cape.
(I always do this for prospective employees, finding nothing is worse than nearly anything you can find)
I would laugh, and think this guy is a bit of a nut, but I would read your blog and you would have already created a positive impression.
Get the rest of your photos up.
2. pimaster | August 17th, 2006 at 12:50 am
I’ve had a lot of different views about acknowledging the cape. The guys at Herald and Weekly times would say that it is something that I would have to discuss, because that is who I am.
I had a long discussion with someone from Telstra, who said that it was like sleeping with a teddy. It’s something you did when you were younger, but you should grow out of it.
The funny thing is: at the time I had just bought my code monkey which now sleeps at my bed head. And I divulged this information and he wasn’t impressed again.
I tried to ask why you would stop doing something unless you had a good reason. If wearing a cape or sleeping near a monkey puts a smile on your face every now and then, why stop?
There is also the other thing: It is who I am. If I stop being the "hero" I enjoy being, what is left for me?
I’m glad you approve of the move. For future reference, if any prospective employer comes across this comment, if you don’t like me in the cape then the chances are that I wouldn’t like the environment that I’d be working in and this blog has saved us both a lot of potentially wasted time.
Monday, August 14, 2006
Tuesday, August 8, 2006
Stupid spammers
Sorry people. Looks like my account has been the target of some spam lately.
I have upped the rules on commenting. Hope I haven’t caused too much pain in the latest comments list
-= Comments
1. Matthew Delves | August 7th, 2006 at 11:32 pm
Have been doing just that for a while. I too hate spammers and think they are the scum of the Earth.
2. Zooba | August 7th, 2006 at 11:57 pm
Same here. I’ve started disabling comments on posts after they’ve been up for a while. This seems to be an automatic feature of some software, I wonder if WordPress has something similar?
3. Thushan Fernando | August 8th, 2006 at 8:28 pm
spammers suck, most are bots, i’ve kept mine disabled from last year but only recently enabled mine again after i realised some bots dont quite understand the need to travel to another link to post a comment (previously we used .TEXT which had a post comment form on the page much like ByteClub does now…) moderation does help but occasionally several bots will navigate through and find a post form….
someone should start a WoS (War on Spammers)
I have upped the rules on commenting. Hope I haven’t caused too much pain in the latest comments list
-= Comments
1. Matthew Delves | August 7th, 2006 at 11:32 pm
Have been doing just that for a while. I too hate spammers and think they are the scum of the Earth.
2. Zooba | August 7th, 2006 at 11:57 pm
Same here. I’ve started disabling comments on posts after they’ve been up for a while. This seems to be an automatic feature of some software, I wonder if WordPress has something similar?
3. Thushan Fernando | August 8th, 2006 at 8:28 pm
spammers suck, most are bots, i’ve kept mine disabled from last year but only recently enabled mine again after i realised some bots dont quite understand the need to travel to another link to post a comment (previously we used .TEXT which had a post comment form on the page much like ByteClub does now…) moderation does help but occasionally several bots will navigate through and find a post form….
someone should start a WoS (War on Spammers)
Saturday, August 5, 2006
Can’t use regex as response
Must abuse posting privledge
I think I hold the key to Xavier’s problem
<([^/][^>]*?[^/])>(?!.*?</\1>)
-= Comments
1. Xavier | August 4th, 2006 at 3:45 pm
This will incorrectly match normal tags too though?
Input:blah
Output: blah
2. Xavier | August 4th, 2006 at 3:48 pm
Oh wait, I get it now. It will also match unclosed divs and such, which (I think) I want the parser to do because it closes them properly, where as it closes img tags as if they were divs, which is wrong.
I want it to only match img,input,…whatever I put in my post
3. pimaster | August 4th, 2006 at 10:12 pm
<((?:br)|(?:img)|(?:hr)|(?:script))[^/]*?>
Althought the script one isn’t handled well since sometimes it can be part of a pair, and sometimes it isn’t.
You could try pairing it with the orignal !\1 check, but I had trouble when there were two open scripts and only 1 close script.
I think I hold the key to Xavier’s problem
<([^/][^>]*?[^/])>(?!.*?</\1>)
-= Comments
1. Xavier | August 4th, 2006 at 3:45 pm
This will incorrectly match normal tags too though?
Input:blah
Output: blah
2. Xavier | August 4th, 2006 at 3:48 pm
Oh wait, I get it now. It will also match unclosed divs and such, which (I think) I want the parser to do because it closes them properly, where as it closes img tags as if they were divs, which is wrong.
I want it to only match img,input,…whatever I put in my post
3. pimaster | August 4th, 2006 at 10:12 pm
<((?:br)|(?:img)|(?:hr)|(?:script))[^/]*?>
Althought the script one isn’t handled well since sometimes it can be part of a pair, and sometimes it isn’t.
You could try pairing it with the orignal !\1 check, but I had trouble when there were two open scripts and only 1 close script.
Thursday, August 3, 2006
Attempt at pretty code
I don’t think I’ve got it shorter, it does look slightly different.
I was aiming for something clean, but there is a small problem about renaming the first version.
This also doesn’t leave an original someName. Everything would return someName_1 and so on.
It probably needs a check incase there is no . in the file name.
- Edit a little bit later
I was hoping to add a track back to Mark, but it didn’t work the first time….
-= Comments
1. Mark | August 3rd, 2006 at 10:53 am
hmm, so that’s what a real programmers code looks like..
I still prefer the explodes / implodes to break into arrays.. rather than using substrings - I guess it’s just personal preference.
I really like this part.. It makes the looping part of the code very small. It’s a little more readable too with good variable names as opposed to my obscure arrays $file_name_parts and $file_name_inner_parts
while( file_exists( $toDirector . $name . $version . $ext )
{
$version++;
}
Will your version handle a filename with other ‘_’s in it.. e.g. my_broken_filename_with_too_many_underscores.jpg?
2. pimaster | August 3rd, 2006 at 4:15 pm
I think so. Didn’t get around to testing it. If I wrote it in java I would have included JUnit tests.
Have they come out with PUnit framework yet?
I only used substrings because I thought it would have made it shorter.
I was thinking of using a regular expression, but my mind was wandering
implode vs substring could be personal. I was thinking that substring might be quicker. (But I might be splitting hairs)
I was aiming for something clean, but there is a small problem about renaming the first version.
This also doesn’t leave an original someName. Everything would return someName_1 and so on.
It probably needs a check incase there is no . in the file name.
[php]
$VERSION_SEPARATOR = ‘_’;
$EXTENSION_SEPARATOR = ‘.’;
function getNextFileVersion( $fileName, $toDirectory )
{
$toDirector = dirname($toDirector) . DIRECTORY_SEPARATOR;
$versionPos = strrpos( $fileName, $VERSION_SEPARATOR);
$extensionPos = strrpos( $fileName, $EXTENSION_SEPARATOR, $versionPos);
if( $versionPos > 0 )
{
$version = substr($fileName, $versionPos + 1, $versionPos + $extensionPos - 1);
}
$iCantThinkofABetterNameForARandomHack = ‘’;
if( false == is_numeric( $version ) )
{
$version = 1;
$versionPos = $extensionPos;
$iCantThinkofABetterNameForARandomHack = $VERSION_SEPARATOR;
}
$name = substr($fileName, 0, $versionPos);
$ext = substr($fileName, extensionPos) . $iCantThinkofABetterNameForARandomHack;
while( file_exists( $toDirector . $name . $version . $ext )
{
$version++;
}
return $name . $version . $ext;
}
- Edit a little bit later
I was hoping to add a track back to Mark, but it didn’t work the first time….
-= Comments
1. Mark | August 3rd, 2006 at 10:53 am
hmm, so that’s what a real programmers code looks like..
I still prefer the explodes / implodes to break into arrays.. rather than using substrings - I guess it’s just personal preference.
I really like this part.. It makes the looping part of the code very small. It’s a little more readable too with good variable names as opposed to my obscure arrays $file_name_parts and $file_name_inner_parts
while( file_exists( $toDirector . $name . $version . $ext )
{
$version++;
}
Will your version handle a filename with other ‘_’s in it.. e.g. my_broken_filename_with_too_many_underscores.jpg?
2. pimaster | August 3rd, 2006 at 4:15 pm
I think so. Didn’t get around to testing it. If I wrote it in java I would have included JUnit tests.
Have they come out with PUnit framework yet?
I only used substrings because I thought it would have made it shorter.
I was thinking of using a regular expression, but my mind was wandering
implode vs substring could be personal. I was thinking that substring might be quicker. (But I might be splitting hairs)
Sunday, July 30, 2006
Broken Chair take 2
Some of you may remember my original complaint about a broken chair.
No problems, next door neighbor helped in fixing it.
Chair broke again. This time one of the legs decided it just wanted to give way. It happened when I was trying to turn my computer on, so of course I fell of it rather awkwardly.
So I went out and bought another one. It’s currently sitting a bit higher than the previous chair, but I’ll make it comfortable.
Also have to get my "groove" back into the chair
No problems, next door neighbor helped in fixing it.
Chair broke again. This time one of the legs decided it just wanted to give way. It happened when I was trying to turn my computer on, so of course I fell of it rather awkwardly.
So I went out and bought another one. It’s currently sitting a bit higher than the previous chair, but I’ll make it comfortable.
Also have to get my "groove" back into the chair
Wednesday, July 26, 2006
Word on Generics
Had another java programmer here at work point me at a page complaining about generics
Ken Arnold’s Blog
And because I was interested in the possible performance issues that might be associated with generics, I wanted a read.
But it turned out to be a discuss about the difficulties of using generics. I read the article and I didn’t understand what his problem was. It seemed like he was using generics wrongly.
I though generics where meant to be an aid to prevent typecasting from items. A way to gaurantee that when you put something in of a certain type, it will come out as that type without typecasting.
There was one line in there “Right now, there are some idioms that you cannot code without a type-safety warning, such as creating arrays of generic types”
Unless I’ve missed something, isn’t
List<Thing>[] myList = new ArrayList<Thing>[5] ;// *
All you need to do?
*Code may not compile. I don’t think I’ve set Eclipse for 1.5
-= Comments
1. Matthew Delves | July 25th, 2006 at 12:28 pm
Whilst I am not a big fan of idiot proof code, it does make for more stable programs if and when it is used properly. Surprisingly someone who would be assumed to know Java would not be able to grasp the concept of Generics and convey it to others.
Ken Arnold’s Blog
And because I was interested in the possible performance issues that might be associated with generics, I wanted a read.
But it turned out to be a discuss about the difficulties of using generics. I read the article and I didn’t understand what his problem was. It seemed like he was using generics wrongly.
I though generics where meant to be an aid to prevent typecasting from items. A way to gaurantee that when you put something in of a certain type, it will come out as that type without typecasting.
There was one line in there “Right now, there are some idioms that you cannot code without a type-safety warning, such as creating arrays of generic types”
Unless I’ve missed something, isn’t
List<Thing>[] myList = new ArrayList<Thing>[5] ;// *
All you need to do?
*Code may not compile. I don’t think I’ve set Eclipse for 1.5
-= Comments
1. Matthew Delves | July 25th, 2006 at 12:28 pm
Whilst I am not a big fan of idiot proof code, it does make for more stable programs if and when it is used properly. Surprisingly someone who would be assumed to know Java would not be able to grasp the concept of Generics and convey it to others.
Simplifying code
It has been a while since I have written a good simplify post. It has also been a while since I’ve posted several entries end to end
Now I know it could be shortened to one line, but then things start looking a little long. If it was c# with properties, I might have gone with it.
-= Comments
1. Lucien | July 26th, 2006 at 11:07 am
The one liner for that isn’t so bad.
return file.getName().endsWith(value);
At least you didn’t start with:
That’s the kind of newbie code I *love*
2. Mark | July 26th, 2006 at 12:24 pm
This one with css is a classic
border-top-color: #000000;
border-right-color: #000000;
border-bottom-color: #000000;
border-left-color: #000000;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
The amount of times I see the above code is stunning..
border: 1px solid #000;
3. Matthew Delves | July 26th, 2006 at 12:27 pm
There is something always beautiful about simple code. It is easy to follow and as long as you know exactly what it does there can be less bugs.
4. Lucien | July 26th, 2006 at 12:43 pm
With the CSS example, I expect it’s auto generated by some tool (not the tool sitting in front of teh keyboard).
doesn’t make it any more acceptable. And since humans inevitably have to go in and tweak it when it’s not working, it just makes out job harder.
5. Clinton | July 26th, 2006 at 1:17 pm
I’ve seen a few tools "expand" css rules because they internally expand them to implement each feature (aka firefox+web developer -> css view etc).
A neat css tidy tool at http://csstidy.sourceforge.net/i but the informed human is still the elegant solution…
6. Lucien | July 26th, 2006 at 2:17 pm
What about an elegant human designing an informed solution?
7. Mark | July 27th, 2006 at 10:54 am
No, an informed designer building an elegant solution.
[java]
String fileName = file.getName();
if (fileName.endsWith(someValue)) {
return true;
} else {
return false;
}
[java]
String fileName = file.getName();
return fileName.endsWith(someValue));
Now I know it could be shortened to one line, but then things start looking a little long. If it was c# with properties, I might have gone with it.
-= Comments
1. Lucien | July 26th, 2006 at 11:07 am
The one liner for that isn’t so bad.
return file.getName().endsWith(value);
At least you didn’t start with:
[java]
String fileName = file.getName();
if (fileName.endsWith(someValue) == true) {
return true;
} else if (fileName.endsWith(someValue) == false) {
return false;
}
That’s the kind of newbie code I *love*
2. Mark | July 26th, 2006 at 12:24 pm
This one with css is a classic
border-top-color: #000000;
border-right-color: #000000;
border-bottom-color: #000000;
border-left-color: #000000;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
The amount of times I see the above code is stunning..
border: 1px solid #000;
3. Matthew Delves | July 26th, 2006 at 12:27 pm
There is something always beautiful about simple code. It is easy to follow and as long as you know exactly what it does there can be less bugs.
4. Lucien | July 26th, 2006 at 12:43 pm
With the CSS example, I expect it’s auto generated by some tool (not the tool sitting in front of teh keyboard).
doesn’t make it any more acceptable. And since humans inevitably have to go in and tweak it when it’s not working, it just makes out job harder.
5. Clinton | July 26th, 2006 at 1:17 pm
I’ve seen a few tools "expand" css rules because they internally expand them to implement each feature (aka firefox+web developer -> css view etc).
A neat css tidy tool at http://csstidy.sourceforge.net/i but the informed human is still the elegant solution…
6. Lucien | July 26th, 2006 at 2:17 pm
What about an elegant human designing an informed solution?
7. Mark | July 27th, 2006 at 10:54 am
No, an informed designer building an elegant solution.
Subscribe to:
Posts (Atom)
