{"id":2465,"date":"2008-01-03T16:17:06","date_gmt":"2008-01-03T23:17:06","guid":{"rendered":"http:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/?p=2465"},"modified":"2008-01-04T23:23:02","modified_gmt":"2008-01-05T06:23:02","slug":"speaking-in-tongues-for-morgan-brown-a-quick-and-dirty-contributors-blogroll","status":"publish","type":"post","link":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/2465\/speaking-in-tongues-for-morgan-brown-a-quick-and-dirty-contributors-blogroll\/","title":{"rendered":"Speaking in tongues for Morgan Brown: A quick and dirty contributors&#8217; blogroll"},"content":{"rendered":"<p>I know I promised to do nothing but &#8220;includes,&#8221; and we&#8217;ll come back to those soon, but here is a real PHP routine, doing an actual real world job. What does it do? For a multi-author weblog like BloodhoundBlog, it produces a blogroll of the contributors&#8217; weblogs or web sites. I&#8217;m sending this out to Morgan Brown, because <a href=\"http:\/\/blownmortgage.com\/\" target=\"_blank\">Blown Mortgage<\/a> is a multi-author blog &#8212; and because Morgan has joined ranks with Cheryl Johnson as a geek-blogger.<\/p>\n<p>Why do this with software when it can be done with the &#8220;Links&#8221; feature within WordPress? Because a list done this way is self-maintaining. This code is based on the &#8220;Frequent Contributors&#8221; code on BloodhoundBlog &#8212; which would be a lot harder to explain. I added this last week when I upgraded to WordPress 2.3.2.<\/p>\n<p>Here&#8217;s the code. I&#8217;ll go back through it and comment line-by-line:<\/p>\n<pre>&lt;h2&gt;Our Contributors' Web Sites&lt;\/h2&gt;&lt;UL&gt;\r\n\r\n&lt;?PHP\r\n$contribs = array(1,3,6,8,9);\r\n$count = sizeof($contribs);\r\nshuffle($contribs);\r\nfor($i=0;$i&lt;$count;$i++)\r\n\t{\r\n\t$thisUser = $contribs[$i];\r\n\t$curauth = get_userdata($thisUser);\r\n\t?&gt;\r\n\t&lt;li&gt;&lt;a href=\"&lt;?PHP echo $curauth-&gt;user_url; ?&gt;\" \r\n\ttarget=\"_blank\"&gt;\r\n\t&lt;?php echo $curauth-&gt;yim;&#160;?&gt;&lt;\/a&gt;&lt;\/li&gt;\r\n\t&lt;?PHP\r\n\t}\r\n?&gt;&lt;\/UL&gt;<\/pre>\n<p>Here&#8217;s the thing: PHP is a very sloppy language.<\/p>\n<p>From Ada Lovelace to Kernighan and Richie, programming was always done with very tight, very clean code. Hardware was slow and expensive, so programmers were, relatively speaking, plentiful and cheap. Moore&#8217;s Law inverts that paradigm, with the result that any cost in hardware is worth bearing to maximize programmer time. This is why you&#8217;re always buying bigger, faster hardware, because programmers are sucking up every bit of it and then some. ANSI C was perhaps the apogee of the orbit for clean code: Strongly typed, strict syntax, unforgiving compilers. But, written right, C could get right down to the bone, running as fast, or almost as fast, as functionally-equivalent machine code.<\/p>\n<p>PHP is like C in many, many respects &#8212; except that, like Javascript before it, it dispenses with type-checking, function prototyping, most syntax-checking, etc. It&#8217;s interpreted at run-time, not compiled, so there&#8217;s no compiler to catch errors. Instead of maximizing machine resources, PHP maximizes programmer time. It exists to let a skilled programmer bang out tons of original code in no time flat. Many other web programming environments are similarly loose, and, while this grates <a href=\"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/2465\/speaking-in-tongues-for-morgan-brown-a-quick-and-dirty-contributors-blogroll\/#more-2465\" class=\"more-link\">Read more<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I know I promised to do nothing but &#8220;includes,&#8221; and we&#8217;ll come back to those soon, but here is a real PHP routine, doing an actual real world job. What does it do? For a multi-author weblog like BloodhoundBlog, it produces a blogroll of the contributors&#8217; weblogs or web sites. I&#8217;m sending this out to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3,6,5,19],"tags":[],"class_list":{"0":"post-2465","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-blogging","7":"category-marketing","8":"category-real-estate","9":"category-technology","11":"no-featured-image"},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1225,"url":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/1225\/rocking-the-boat-for-fun-and-profit-introducing-morgan-brown\/","url_meta":{"origin":2465,"position":0},"title":"Rocking the boat for fun and profit: Introducing Morgan Brown","author":"Greg Swann","date":"March 27, 2007","format":false,"excerpt":"We're adding another contributor this morning: Morgan Brown, a lender from Orange County: Morgan Brown is a mortgage banker and broker in Irvine, CA. He enjoys reading and blogging, and he is on a personal mission to change the public perception of the mortgage industry through honesty -- even if\u2026","rel":"","context":"In &quot;Blogging&quot;","block_context":{"text":"Blogging","link":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/category\/blogging\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1243,"url":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/1243\/my-short-list-of-real-estate-carnival-candidates\/","url_meta":{"origin":2465,"position":1},"title":"My short list of real estate carnival candidates","author":"Greg Swann","date":"March 31, 2007","format":false,"excerpt":"I am continually amazed at the people who write for BloodhoundBlog. Day after day they knock me out, but it's always late Saturday or early Sunday when I am most impressed. Why? That's when I have to make my short-list of candidate posts for the week's real estate carnivals. Cathleen\u2026","rel":"","context":"In &quot;Blogging&quot;","block_context":{"text":"Blogging","link":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/category\/blogging\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2073,"url":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/2073\/the-odysseus-medal-competition-voting-for-the-peoples-choice-award-is-open-3\/","url_meta":{"origin":2465,"position":2},"title":"The Odysseus Medal competition &#8212; Voting for the People&#8217;s Choice Award is open","author":"Greg Swann","date":"October 21, 2007","format":false,"excerpt":"A dozen nominees again. It's a workable number, and it gets us down to nothing but very serious posts. There are three from BloodhoundBlog here, but there's nothing for it. Two of the three dominated the debate this week. If anything, I'm less fair to our contributors in the final\u2026","rel":"","context":"In &quot;Blog Carnivals&quot;","block_context":{"text":"Blog Carnivals","link":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/category\/blog-carnivals\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2433,"url":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/2433\/speaking-in-tongues-presentable-php-in-wordpress\/","url_meta":{"origin":2465,"position":3},"title":"Speaking in tongues: Presentable PHP in WordPress","author":"Greg Swann","date":"December 27, 2007","format":false,"excerpt":"In the coming days, I plan to take up the idea of PHP for non-programmers, helping you tap the power of PHP's dynamic text processing without learning (much) actual coding. The problem is that illustrating HTML or PHP in WordPress is always a problem. Why? Because WordPress eats code for\u2026","rel":"","context":"In &quot;Blogging&quot;","block_context":{"text":"Blogging","link":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/category\/blogging\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1752,"url":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/1752\/wagging-the-dog-at-the-carnival-of-real-estate\/","url_meta":{"origin":2465,"position":4},"title":"Wagging the dog at the Carnival of Real Estate","author":"Greg Swann","date":"August 6, 2007","format":false,"excerpt":"Our policy is that Cathleen Collins chooses our nominees for real estate carnivals. I trust her to be objective, particularly about my posts. The contributors are polled for nominations on Saturday night, with their suggestions going to Cathy. Sometimes I overrule her, and sometimes she asks me to cover for\u2026","rel":"","context":"In &quot;Blog Carnivals&quot;","block_context":{"text":"Blog Carnivals","link":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/category\/blog-carnivals\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1224,"url":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/1224\/how-to-make-google-your-weblogs-best-friend\/","url_meta":{"origin":2465,"position":5},"title":"Project Bloodhound: How to make Google your weblog&#8217;s best friend","author":"Greg Swann","date":"June 27, 2008","format":false,"excerpt":"[This is one of the all-time most popular posts on BloodhoundBlog. I'm reprising it for Project Bloodhound, first because it's a nice leveraged SEO solution, and second because it's a painless introduction to customizing the PHP in WordPress. --GSS] \u00a0Who can probe all the mysteries of Google? Not me, and\u2026","rel":"","context":"In &quot;Blogging&quot;","block_context":{"text":"Blogging","link":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/category\/blogging\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/posts\/2465","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/comments?post=2465"}],"version-history":[{"count":0,"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/posts\/2465\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/media?parent=2465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/categories?post=2465"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bloodhoundrealty.com\/BloodhoundBlog\/wp-json\/wp\/v2\/tags?post=2465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}