Sunday, April 27. 2008Selling stuff to the pawn shop
Well, my apartment is a mess. I'm single, and don't have a roommate, so there's been little incentive to clean. However, I'd rather not live in a pig sty forever, so it was time to clean. I like fancy new technology, so I've got a bunch kicking around that I don't use anymore. Parting with junk is tough, but it's way easier if you can get money for it, it seems easier. Plus, you get money. So I took my aforementioned (but unplayed for the past year) PSP to the pawn shop to sell it (once I did one last game for memories sake).
Running a pawn shop has to suck, apart from needing to take down details on everyone they buy from, they need to hold onto everything they buy for 30 days before they can sell it again. So they pay first, then can sell again after a month. This is reverse of a lot of retailers who manage to get products, then pay for them later! Friday, April 11. 2008Open Web Vancouver
I (despite Air Canada's best efforts) have arrived safely in Vancouver in preperation for Open Web Vancouver. I'll be doing a new talk on State and History in Ajax. I'll be leveraging the YUI throughout the talk. Registration is still open for the conference so if you're in the area come on by, tickets are a steal at only $150!
I'd also like to thank php|architect for sponsoring my attendance once again this year. Wednesday, March 5. 2008PDO Week!
So we're half way into PDO week at funcaday. I've wanted to do theme weeks since the beginning, a few emails prompted me to take a look at PDO for this first theme week, and now that i've gotten i started I'm quite enjoying it. If you've got any suggestions for future weeks let me know.
Tuesday, March 4. 2008I miss Zend Studio
So I dual develop, I flip back and forth between Active State's Komodo, and Zend's Zend Studio (the first generation). One of my favourite features of Zend Studio is the Code Analyzer, it basically reads through your code and tells you about all your bugs. No, I'm not talking about syntax errors, I'm talking about using variables before they were defined, an assignment in condition, variables only being used once, functions returning something sometimes and nothing other times. It helps you find those tiny annoying bugs that take you hours to find normally in less than a second. Anyways, it's great, it's something I flip over for.
I miss it because it wont register... Saturday, February 23. 2008Contest
Hey all, if you like PHP and are looking for some fun stuff to just experiment with, why not try one of our contests? php|architect is launching regular PHP Programming contests, so take a look at our first running, a link parser
Also, take a look at some of our new free great articles up at C7Y. Thursday, February 14. 2008
Happy Valentines Day - The funcaday way Posted by Paul Reinheimer
in PHP at
00:01
Comments (0) Trackback (1) Happy Valentines Day - The funcaday way
I trust you've seen today's funcaday, if not head over and look now. Want a custom one to share with someone you care about. Fill out the form here. It's a subtle effect though, they'll need to read it.
Valid characters for names are just alphabetics and the underscore, sorry. You could also buy advertising, I'd like to eat this month. Saturday, January 5. 2008Today's Funcaday
I'm really restricted on space, so I wanted to present a counter point on today's funcaday: Performance.
The disadvantage with the escape for now, not for later approach is simple. If you save a user's post to the database, then that user's post is displayed 2,000 times there will be some serious differences. Under the approach I reccomend the post will be escaped with mysql_real_escape_string() once, and with htmlentiteis() 2,000 times. If you had escaped it twice in the first place those functions would have been called once each, saving you 1,999 calls to htmlentities. You will need to balance your security concerns with performance needs. Note: This blog post was written well in advance, I'm on vacation, don't have my laptop or internet, and it's likely that my cell phone won't even turn on. So replies may be a bit tardy. Note^2: But I'm not dumb, someone's looking after my server Tuesday, December 25. 2007Merry Christmas![]() Talk to you in the new year. Tuesday, December 18. 2007
Photoshop - Working with different ... Posted by Paul Reinheimer
at
15:46
Comment (1) Trackbacks (0) Photoshop - Working with different pixel ratios
My grandparents are getting a digital photo frame for Christmas, they don't own a computer so the cat's not out of the bag. This digital frame has a stated resolution that's way off what you're looking at, the frame is like 16:9, but the pixel is... something else. I had a hard time working in Photoshop trying to prep the images for the system, since the pixels aren't square, they're rectangles, what looked good here looked like crap over there, etc. Then I found the pixel aspect ratio option under Image, created my own aspect ratio (using a ruler, and the pixel counts) and voila, I could now draw squares in photoshop that were square within the frame.
I still had a problem, when I converted existing images over to the new ratio, they got squished, it showed me a preview (which is all it really does), but didn't resample the image to look right under the new ratio. The solution is pretty easy, open up image size, turn off constrain properties then divide the width by the pixel aspect ratio and apply. Your image is now stretched. Then apply the pixel aspect ratio, and it should look normal. Sunday, December 16. 2007Get it Right or Get it Up.
When working on any web development project, you have two central choices, Get it Right, or Get it Up. While the same choices dominate development as a whole, the low cost, high speed, and largely transparent nature of updates on the web make getting it up more tempting.
Getting it Right is what most developers strive for: clean code, easy to read, easy to use, easy to refractor. It's great, but it's not fast. I would even go as far to say that it's relatively easy to estimate how long it will take to develop something, but very difficult to estimate how long it will take to develop something "right". Getting it Up (pun unintentional) is when you release just as soon as things work (mostly). You get the code working in some manner that vaguely represents what you're actually hoping for, push it live, then fix things as they break, add new features as they're required. It's faster, but you don't get to have that grand release party as soon as the application goes live, as you're probably madly mashing the keyboard trying to fix all the bugs that your users are finding. (more after the jump) Continue reading "Get it Right or Get it Up." Saturday, December 15. 2007Resources are "special"
Working on funcaday I've spent a lot of time dealing with variables of the type resource in the past few weeks, after all GD images are held in variables of that type. I ran into some "functionality" of resources late last night that I initially chalked up to a bug, a variable of type resource went from being a resource of type GD to unknown while merely getting returned back a few steps. After some experimentation (and the inevitable epiphany while brushing my teeth) I've figured it out, and there's no bug.
Here's a longish snippet explaining what I was encountering: class imageTest { Which returns something like: resource(3, gd) (more after the jump) Continue reading "Resources are "special"" Saturday, December 15. 2007funcaday
Sorry to everyone for the issues this evening, non-feed based users of the site should have seen everything up and working perfectly by 12:05am EST, while feed users needed to wait until almost 1:00am EST
1) Today's post posed a few issues, namely, it's the first weekend based post we've had so it's running through a different image creation path. 2) Since there's only one image for two days over the weekend, there's a whole bunch of code in various places to handle that. The Real Issue: I think I've found a bug in PHP. I didn't have time to develop a base case to prove it this evening (while the clock struck down towards midnight) but it seems as though resources can get mangled when being returned a few levels.
If you're interested in presenting funcaday to anyone through a project of your own, I'd reccomend taking a look at the json feed. Either json.xml, or funcaday.json. The information is identical in those two files, the difference is really just the extension, Technically if you're using JS the XHR object wants a text/html content type, so I provide the .xml version to get Apache to give you that header, if you're using anything else, go for the .json. Let me know if there's anything else you'd like to see in there. One question for the mindful readers, in the RSS code I have:
Can anyone tell me why I would add the extra step? Do I actually need to do this, or is this just me following outdated practices? P.S. There's aparently a video version of funcaday by an anonymous... fan? Monday, December 10. 2007funcaday
I am proud to announce the launch of the funcaday project with my graphic design buddy Courtney Wilson. The goal of the project is to showcase a new PHP function each weekday, then a new concept, term, or technique each weekend.
Sunday, December 9. 2007Good Practice?
I've got a project where I'm storing a lot of data in an object, and the object itself (through the use of a public method) returns the queries required to either insert the data the object contains, or update an existing record to reflect what it's storing. For a while I had a bunch of code of the (common?) but ugly:
Continue reading "Good Practice?" Sunday, November 25. 2007BBC Planet Earth
We live on Planet Earth, every now and then you take in a sight so beautiful and breathtaking, you're forced to stop and take stock of what you're doing, believing, or simply why you're not seeking out those sights more often. This documentary is five discs of that moment happening continuously. Plants, animals, and even minerals in ways you've never imagined.
Each disc is separated into separate episodes (the documentary was filmed for the BBC), with each episode concentrating on a theme such as deep oceans, fresh water, caves, or mountains. The hour long episode examines and explores the various wildlife present in each of these locales with breathtaking footage, and beautiful narration. each second of video is the kind of "perfect shot" that you would set up as your desktop wallpaper and leave for months. The narration is from BBC's resident expert David Attenborough, there's a version released for the US where it's been re-dubbed, I'd recommend the original brit though. Small anecdote, after going out with a few friends we came back to my place for some hot chocolate (with baileys), I offered to throw something onto the TV, and got some strange looks when I suggested a documentary over the wide variety of other options. There won't be any disbelievers next time. Overall, my highest possible recommendation for pretty much anyone with a television. (Links for HD DVD, Regular DVD, and Blu-Ray respectively. ) |
QuicksearchCalendar
ArchivesCategoriesSyndicate This BlogBlog Administration |
|||||||||||||||||||||||||||||||||||||||||||||||||

