August 2009
48 posts
Potatohead: an experimental prototype object model/framework for development with PHP. http://github.com/brendan/potatohead
Aug 1st
Considering implementing a Diffie-Helman key exchange in php+javascript to allow secure transfer of a secret code without resorting to SSL.
Aug 1st
July 2009
45 posts
Law of Demeter, plz. Kthx bye.
Jul 31st
What’s your favorite approach for C-style (or PHP/Java) code? Allman style w/ 2 space indent: function f() { if() { x; y; } }
Jul 30th
I created a modifed parser syntax for Testing_DocTest so doctests need *much less* boilerplate. http://gist.github.com/158422
Jul 29th
ps: I have a ruby question for you: How do I become rich beyond my wildest dreams?
bb: alias_method_chain :bank_account, :syphon
Jul 29th
Engine Yard now almost owns all of Ruby, having just hiring JRuby team. I wonder if they could offer enough $$$ to Matz and *have it all*?
Jul 29th
Hey, universe. I have a new local SF phone number now thanks to Google Voice: (415) 894-0207 — also my old 312 mobile number is gone now.
Jul 28th
Ghetto function argument reflection in Javascript. http://gist.github.com/77096
Jul 28th
this compiler doesn’t optimize free(malloc(sizeof(infinity)));
Jul 28th
I can’t believe I avoided C programming for this long— and I really don’t understand why we were taught Pascal instead of C in High School.
Jul 28th
A warning from the Unix m4 manual (section 1.1): “Beware that m4 may be dangerous for the health of compulsive programmers.”
Jul 27th
.name is the most meaningless tld I can think of. How exactly did that get approved? No offense to anyone with a .name domain.
Jul 27th
C programmers: is there a doctest equivalent out there for C programming? #c #doctest
Jul 27th
The fact that people are still prefixing @ replies in twitter with single characters means Twitter is still broken.
Jul 27th
http://www.facebook.com/config.yml Tee hee.
Jul 27th
Falling in love with the Diffie-Hellman key exchange all over again.
Jul 27th
Now that I’m getting familiar with C, I see where PHP gets its design patterns. Also realize I’d much rather write web apps in C than PHP.
Jul 27th
Today I learned that C programs are actually much more readable than Java programs. Hello world in C: main() { puts(“hi”); return(0); }
Jul 26th
Ruby Shines in Emerging Markets (from Feb 2009) - http://bit.ly/jxhyp [devs in China/India use Ruby more than twice as much as in the west]
Jul 26th
What I love about Ruby: I’ve never checked what happens when calling Hash#merge with a block, but it totally just did what I’d want it to.
Jul 20th
July 16, 2009: PHP migrates its RCS from CVS to SVN. THAT is some serious cutting edge tech!
Jul 17th
I did some benchmarks to help find “best/fastest” ways to do some low-level operations in PHP and posted here http://bit.ly/7wVRr #php #perf
Jul 16th
PHP Statement Benchmarks
I have been looking at the relative cost of executing statements in PHP to help empirically identify approaches for writing fastest-possible code in PHP. There are some interesting results here, and your mileage may vary. The benchmarks were run on a Mac using the entropy.ch build of PHP 5.3.0. The code for running the benchmarks is available at github. seconds code (exec 100000...
Jul 16th
In case it isn’t evident from my tweets I’ve been running a lot of PHP low-level benchmarks lately. Will post findings to the blog soon.
Jul 16th
When I google for `ometa php` I don’t get a single result that matches my query but I get 12mil that don’t. http://bit.ly/160yTD #GOOGLEFAIL
Jul 16th
Another PHP fun-fact: it is faster to json_decode strings than it is to build structures of ~10 or more nodes with PHP array literal syntax.
Jul 16th
PHP internals baffle me. array_key_exists(“x”, $array_of_5k_items) is about 289 TIMES as expensive as calling @$array_of_5k_items[“x”]
Jul 16th
FINALLY!!!! “Directive ‘magic_quotes_gpc’ is deprecated in PHP 5.3 and greater”
Jul 15th
RT @jasonfried “Working extra long hours doesnʼt mean you care more or get more done. It just means you work more.” — agreed.
Jul 15th
dammit, @gilesgoatboy - now you just made me fat! it’s a zero sum game!
Jul 15th
So, $class::$method() syntax actually doesn’t parse until PHP 5.3, which means I can’t develop my work project using my own framework. :-(
Jul 15th
unexpected T_PAAMAYIM_NEKUDOTAYIM means $class::$method() == PARSE FAIL in PHP 5.2.4 — GRRR my mixin code *doesn’t* work in <= 5.2.4 >.<
Jul 15th
is_callable(‘a_function’) is more than 3 times as expensive as dispatching a call to a_function() in PHP.
Jul 14th
Why is it that every time I use SOAP now, I feel dirty? Irony?
Jul 13th
2 tags
Mixins in PHP that actually work
UPDATE: The following apparently only works with PHP 5.3 and later due to the $class::$method() syntax causing a parse error in prior versions. The only way to get $this keyword to work properly with a Mixin approach in PHP is to use an explicit ClassName::MethodName construction from within the delegating __call method. This means literally having to express the positional arguments for each...
Jul 13th
Working with immutable classes in PHP pushed me to start writing methods as external functions; all of a sudden I am using CLOS to do PHP OO
Jul 10th
OH: “If you have a class that needs redefining on the fly it means you didn’t design it well enough in the first place” another kitten dies.
Jul 10th
PHP experts, do you know if autoloading literally hits the filesystem every time even if the source.php file remains unchanged? #php
Jul 10th
Get Your API Right: http://bit.ly/10onJJ Good article.
Jul 9th
Heredocs really should allow for preservation of the indentation level of initial line. So ugly. It’s not just PHP that fails at this.
Jul 8th
__whatever() is a code smell.
Jul 8th
Why is there even a “debate” about HTML 5 specifying a video codec? Shouldn’t HTML 5 be 100% agnostic with respect to codecs!? WTF? #html5
Jul 6th
Eric Evans on the State of DDD (Domain Driven Design) has some very interesting things to say about usability and sw dev http://bit.ly/lyTdO
Jul 6th
PERMANENTLY OUT: using the prefix “Active” for new libraries.
Jul 6th